jdk/src/share/classes/java/lang/Double.java
changeset 18156 edb590d448c5
parent 18143 b6ef7bd945ce
child 18546 862067c6481c
equal deleted inserted replaced
18155:889970e5b728 18156:edb590d448c5
   915      * use of the {@code Double.doubleToRawLongBits} method.
   915      * use of the {@code Double.doubleToRawLongBits} method.
   916      *
   916      *
   917      * <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
   917      * <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
   918      * values that can be computed from the argument:
   918      * values that can be computed from the argument:
   919      *
   919      *
   920      * <blockquote><pre>
   920      * <blockquote><pre>{@code
   921      * int s = ((bits &gt;&gt; 63) == 0) ? 1 : -1;
   921      * int s = ((bits >> 63) == 0) ? 1 : -1;
   922      * int e = (int)((bits &gt;&gt; 52) & 0x7ffL);
   922      * int e = (int)((bits >> 52) & 0x7ffL);
   923      * long m = (e == 0) ?
   923      * long m = (e == 0) ?
   924      *                 (bits & 0xfffffffffffffL) &lt;&lt; 1 :
   924      *                 (bits & 0xfffffffffffffL) << 1 :
   925      *                 (bits & 0xfffffffffffffL) | 0x10000000000000L;
   925      *                 (bits & 0xfffffffffffffL) | 0x10000000000000L;
   926      * </pre></blockquote>
   926      * }</pre></blockquote>
   927      *
   927      *
   928      * Then the floating-point result equals the value of the mathematical
   928      * Then the floating-point result equals the value of the mathematical
   929      * expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-1075</sup>.
   929      * expression <i>s</i>&middot;<i>m</i>&middot;2<sup><i>e</i>-1075</sup>.
   930      *
   930      *
   931      * <p>Note that this method may not be able to return a
   931      * <p>Note that this method may not be able to return a