Decimal to binary conversion
Tim Peters
uunet!ksr.com!tim
Fri Feb 18 13:11:46 PST 1994
> In IEEE-754, 5.6 Binary <-> Decimal Conversion, the sentence "On input,
> trailing zeros shall be appended to or stripped from M (up to the
> limits specified in Table 2) so as to minimize N." appears. What is
> the sense of "minimize N"? Is it closest to zero, or closest to
> -infinity?
Since N is non-negative, there's no ambiguity (i.e., "to 0" and "to -inf"
are the same).
It takes (just) a little imagination to infer the "N is non-negative"
constraint from the 754 text. The corresponding section of IEEE-854 is
explicit about this, so read that too for clarification.
interpretingly y'rs - tim
Tim Peters timaksr.com
not speaking for Kendall Square Research Corp
More information about the Numeric-interest
mailing list