# Re: Value space of double

From: Xan Gregg <xan@tibco.com>
Date: Thu, 15 May 2003 17:23:58 -0400
Message-ID: <339902DC0E58D411986A00B0D03D84320186AC6F@extmail.rtp.tibco.com>

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.

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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:01 UTC