20.10
java.lang.Double
THE PACKAGE JAVA.LANG
20.10.22
public static double longBitsToDouble(long bits)
The argument is considered to be a representation of a floating point value accord
ing to the IEEE 754 floating point double format bit layout. That floating point
value is returned as the result.
If the argument is
0x7f80000000000000L
, the result will be positive infinity.
If the argument is
0xff80000000000000L
, the result will be negative infinity.
If the argument is any value in the range
0x7ff0000000000001L
through
0x7fffffffffffffffL
or in the range
0xfff0000000000001L
through
0xffffffffffffffffL
, the result will be NaN. (All IEEE 754 NaN values
are, in effect, lumped together by the Java language into a single value called
NaN.)
In all other cases, let
s
,
e
, and
m
be three values that can be computed from the
argument:
int s = ((bits >> 63) == 0) ? 1 : 1;
int e = (int)((bits >> 52) & 0x7ffL);
long m = (e == 0) ?
(bits & 0xfffffffffffffL) << 1 :
(bits & 0xfffffffffffffL) | 0x10000000000000L;
Then the floating point result equals the value of the mathematical expression
s
m
2
e
1075
.
Let beeves and home bred kine partake
The sweets of Burn mill meadow;
The swan on still St. Mary s Lake
Float double, swan and shadow!
William Wordsworth,
Yarrow Unvisited
(1803)
516
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved