8287838: Update Float and Double to use snippets

Reviewed-by: alanb
This commit is contained in:
Joe Darcy 2022-06-06 21:26:25 +00:00
parent a277590c89
commit 0e06bf3b04
2 changed files with 8 additions and 7 deletions

View file

@ -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>&middot;<i>m</i>&middot;2<sup><i>e</i>-150</sup>.