P Witte wrote:


A question to my learned friends:

In Smsq -1 <> (-1 + 0)

In internal format, Exponent . Mantissa:

-1 = $800 . $C0000000
-1 + 0 = $801 . $80000000


which can be a flaming nuisance!

However,

-1 == (-1 + 0)

which is some relief!

This behaviour appears to apply to all (small?) negative numbers, thus

-8 <> -8 + 0 but

-9 = -9 + 0 !


Does it happen on all negative exact powers of 2, ie:

-(2^x) <> -(2^x) + 0

for x = 0, 1, 2, 3, ... (ie -1, -2, -4, -8, -16, etc)?

> Is this a bug?

Naahhhh, just a feature...

I'm no fp expert (fp dummy is probably the best description), but is it a normalisation bug (based on -8 failing, but -9 working)? [In my very limited experience of fp I vaguely remember that the mantissa should be normalised so that a one is implied to the left of it, and the exponent is offset - so that zero is recognised by (mantissa =) exponent = 0. Thus, exact powers of 2 should have a zero mantissa - excepting sign bit?]

Reply via email to