comp.lang.ada
 help / color / mirror / Atom feed
From: steve@sdcrdcf.UUCP (Steven Holtsberg)
Subject: MANTISSA and DIGITS attributes- is the ARM correct?
Date: Thu, 21-Aug-86 16:39:28 EDT	[thread overview]
Date: Thu Aug 21 16:39:28 1986
Message-ID: <2967@sdcrdcf.UUCP> (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."

             reply	other threads:[~1986-08-21 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-08-21 20:39 Steven Holtsberg [this message]
1986-08-26 13:16 ` MANTISSA and DIGITS attributes- is the ARM correct? John B. Goodenough
replies disabled

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