changing floating point number input.. (was realroots...)
Subject: changing floating point number input.. (was realroots...)
From: Robert Dodier
Date: Tue, 29 Aug 2006 09:46:23 -0600
On 8/29/06, Stavros Macrakis <macrakis at gmail.com> wrote:
> On 8/29/06, Robert Dodier <robert.dodier at gmail.com> wrote:
> > (%o7) float_inf(1, 3CC, 10000000000000)
> > (%o8) float_inf(- 1, 3CC, 10000000000000)
> > (%o9) float_nan(- 1, 3CC, 18000000000000)
> >
> > Printing the sign, exponent, and significand makes the
> > result theoretically readable ....
>
> Nice. But aren't most of the digits reported there redundant?
Yes. +/- fp infinity are unique, so they actually don't need any
extra bits -- they could be float_inf and float_minf symbols, resp.
So-called quiet nan has sign = -1 and exponent = all 1's, and
nonzero significand. Signalling nan has sign = 1. So nan's
could be represented as float_qnan(signficand bits) and
float_snan(significand bits).
It appears that some CL implementations prevent us from
decoding nan's so all this may be irrelevant.
Robert