src/share/classes/sun/misc/FormattedFloatingDecimal.java
Print this page
@@ -28,11 +28,11 @@
import sun.misc.FpUtils;
import sun.misc.DoubleConsts;
import sun.misc.FloatConsts;
import java.util.regex.*;
-public strictfp class FormattedFloatingDecimal{
+public class FormattedFloatingDecimal{
boolean isExceptional;
boolean isNegative;
int decExponent; // value set at construction, then immutable
int decExponentRounded;
char digits[];
@@ -245,12 +245,11 @@
* Compute a number that is the ULP of the given value,
* for purposes of addition/subtraction. Generally easy.
* More difficult if subtracting and the argument
* is a normalized a power of 2, as the ULP changes at these points.
*/
- private static double
- ulp( double dval, boolean subtracting ){
+ private static double ulp( double dval, boolean subtracting ){
long lbits = Double.doubleToLongBits( dval ) & ~signMask;
int binexp = (int)(lbits >>> expShift);
double ulpval;
if ( subtracting && ( binexp >= expShift ) && ((lbits&fractMask) == 0L) ){
// for subtraction from normalized, powers of 2,
@@ -1155,12 +1154,11 @@
* AS A SIDE EFFECT, SET roundDir TO INDICATE PREFERRED
* ROUNDING DIRECTION in case the result is really destined
* for a single-precision float.
*/
- public double
- doubleValue(){
+ public strictfp double doubleValue(){
int kDigits = Math.min( nDigits, maxDecimalDigits+1 );
long lValue;
double dValue;
double rValue, tValue;
@@ -1515,12 +1513,11 @@
* to double has one rounding error, and the conversion of that double
* to a float has another rounding error, IN THE WRONG DIRECTION,
* ( because of the preference to a zero low-order bit ).
*/
- public float
- floatValue(){
+ public strictfp float floatValue(){
int kDigits = Math.min( nDigits, singleMaxDecimalDigits+1 );
int iValue;
float fValue;
// First, check for NaN and Infinity values