[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

reading floats..



  What do others think the reader for floating point numbers
should do when it calculates a 0 mantissa (for float-digits
equal to 53 this would be 4503599627370496 in terms of
a 53 bit 1.F value) and the smallest exponent which would be 0.0
if given to scale-float? (Assume the digits are non-zero)..

  I can see one of the following possibilities:

(1) Could be quiet and produce the smallest possible non-zero
	float of the desired type.

(2) Could be quiet and return 0.0.

(3) Could complain about non-zero digits turning into 0.0.

(4) Compute it in a higher format if possible and let it die
	when converting that to the desired format.

  Note that this question also covers what would be described
as exponent underflow since the mantissa for that would be
too small if we shift the exponent to be in range.

  I vote for #3. Note that a proper printer based upon Guy
Steele's "How To Print Floating Point Numbers.." will not
produce digits which fall into this class, so this is only
a question for "virgin" input.

--David