- From: Xan Gregg <xan@tibco.com>
- Date: Thu, 15 May 2003 17:23:58 -0400
- To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
- Cc: "'sandygao@ca.ibm.com'" <sandygao@ca.ibm.com>
Sandy,
> It seems to me that "e" should be an integer between -1074 and 971,
> inclusive.
Sounds right to me, but it would help if you could explain your reasoning or
source.
Using the google-provided reference,
http://www.psc.edu/general/software/packages/ieee/ieee.html,
# If 0<E<2047 then V=(-1)**S * 2 ** (E-1023) * (1.F) where "1.F"
is intended to represent the binary number created by prefixing F
with an implicit leading 1 and a binary point.
I think the maximum value is E=2046, F=(52 ones), which is
2 ** (1023) * (1.(52ones))
==
2 ** (1023) * (53ones) * 2 ** (-52)
==
2 ** (971) * (53ones)
==
2 ** (971) * (2 ** 53 - 1)
And FWIW, Java says
Double.MAX_VALUE == (Math.pow(2, 53) - 1) * Math.pow(2, 971)
Double.MIN_VALUE == 1* Math.pow(2, -1074)
xan
Xan Gregg
TIBCO Software, Inc.
www.tibco.com
Received on Thursday, 15 May 2003 17:31:58 UTC