[net.lang.ada] MANTISSA and DIGITS attributes- is the ARM correct?

steve@sdcrdcf.UUCP (Steven Holtsberg) (08/21/86)

The Ada reference manual states that for a given floating
point type, T, the value of B (that is, T'MANTISSA) is equal
to the "integer next above (D*log(10)/log(2)) + 1)."

I printed out the values of FLOAT'DIGITS and FLOAT'MANTISSA
on the York Ada compiler at UCLA, and I got the values
7 and 24.

Now, 7 * log(10)/log(2) + 1 = 24.25, so the next integer above is 25,
not 24.

Which is right, the compiler or the definition?  I naturally
assume the definition is correct, but maybe the writers of the
ARM got a little carried away by including "+1" and "the next
integer above."

GOODENOUGH@A.ISI.EDU (John B. Goodenough) (08/26/86)

This question seems to arise about once a year.  The RM definition is correct.
If anyone wants to see why, send me a message and I will forward the 
standard explanation.
-------