ES Decimal status
david.hopwood at industrial-designers.co.uk
Fri Sep 12 13:02:19 PDT 2008
Sam Ruby wrote:
> Description of ES 3.1m decimal support
> number and decimal are distinct primitive data types. The
> former is based on IEEE 754 binary 64 floating point, the latter
> is based on IEEE 754r decimal 128 floating point.
> Conversion from number to decimal is precise and will round trip.
Conversion of number to decimal is not precise.
# Decimal is wider, but while every number expressible as a binary64 will
# map to a unique decimal128 value and will round-trip back to the same
# binary64 number, it is not the case that the numbers that a binary64
# number maps in decimal128 to map to exactly the same point on the real
# number line as the original binary64 number.
#  http://speleotrove.com/decimal/decifaq6.html#binapprox
#  http://speleotrove.com/decimal/decifaq6.html#bindigits
I'm also not sure whether the round-trip property covers all NaNs
(preserving payload), denormal, or unnormal values.
More information about the Es-discuss