# Thread

# 2002.01.21 19:57 "Re: How to interpret 16-bit GrayScale image?", by Daniel McCoy

FEFD / 101 = FD are you sure you want this?

Yep, you have not done the neccessary rounding!:

FEFD / 101 = 253.996, rounding 254 = 0xFE

You didn't say anything about rounding or floating point arithmetic in the message I was complaining about.

I know all about the rounding issues, I mentioned them at the end of my message.

If you just tell people, as you did:

"divide by 257, not 256"

that is BAD advice.

If you want to give people GOOD advice, you need to mention that rounding is required if you use 257.

"divide by 257 with proper rounding"

Because the rounding doesn't just happen, you have to add code to do it. And not everyone will know that.

Clear?

Dan