comp.lang.ada
 help / color / mirror / Atom feed
* MANTISSA and DIGITS attributes- is the ARM correct?
@ 1986-08-21 20:39 Steven Holtsberg
  1986-08-26 13:16 ` John B. Goodenough
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Holtsberg @ 1986-08-21 20:39 UTC (permalink / raw)



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."

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: MANTISSA and DIGITS attributes- is the ARM correct?
  1986-08-21 20:39 MANTISSA and DIGITS attributes- is the ARM correct? Steven Holtsberg
@ 1986-08-26 13:16 ` John B. Goodenough
  0 siblings, 0 replies; 2+ messages in thread
From: John B. Goodenough @ 1986-08-26 13:16 UTC (permalink / raw)


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.
-------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1986-08-26 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-08-21 20:39 MANTISSA and DIGITS attributes- is the ARM correct? Steven Holtsberg
1986-08-26 13:16 ` John B. Goodenough

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox