mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8287838: Update Float and Double to use snippets
Reviewed-by: alanb
This commit is contained in:
parent
a277590c89
commit
0e06bf3b04
2 changed files with 8 additions and 7 deletions
|
@ -922,13 +922,13 @@ public final class Float extends Number
|
|||
* <p>In all other cases, let <i>s</i>, <i>e</i>, and <i>m</i> be three
|
||||
* values that can be computed from the argument:
|
||||
*
|
||||
* <blockquote><pre>{@code
|
||||
* {@snippet lang="java" :
|
||||
* int s = ((bits >> 31) == 0) ? 1 : -1;
|
||||
* int e = ((bits >> 23) & 0xff);
|
||||
* int m = (e == 0) ?
|
||||
* (bits & 0x7fffff) << 1 :
|
||||
* (bits & 0x7fffff) | 0x800000;
|
||||
* }</pre></blockquote>
|
||||
* }
|
||||
*
|
||||
* Then the floating-point result equals the value of the mathematical
|
||||
* expression <i>s</i>·<i>m</i>·2<sup><i>e</i>-150</sup>.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue