提交 4ba64fc9 编写于 作者: D darcy

7039369: Limit range of strictfp in FloatingDecimal

Summary: Additional reviews by sergey.kuksenko@oracle.com
Reviewed-by: alanb
上级 7047ec9f
......@@ -30,7 +30,7 @@ import sun.misc.DoubleConsts;
import sun.misc.FloatConsts;
import java.util.regex.*;
public strictfp class FloatingDecimal{
public class FloatingDecimal{
boolean isExceptional;
boolean isNegative;
int decExponent;
......@@ -239,8 +239,7 @@ public strictfp class FloatingDecimal{
* 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;
......@@ -1251,8 +1250,7 @@ public strictfp class FloatingDecimal{
* for a single-precision float.
*/
public double
doubleValue(){
public strictfp double doubleValue(){
int kDigits = Math.min( nDigits, maxDecimalDigits+1 );
long lValue;
double dValue;
......@@ -1611,8 +1609,7 @@ public strictfp class FloatingDecimal{
* ( 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;
......
......@@ -30,7 +30,7 @@ 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
......@@ -247,8 +247,7 @@ public strictfp class FormattedFloatingDecimal{
* 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;
......@@ -1157,8 +1156,7 @@ public strictfp class FormattedFloatingDecimal{
* for a single-precision float.
*/
public double
doubleValue(){
public strictfp double doubleValue(){
int kDigits = Math.min( nDigits, maxDecimalDigits+1 );
long lValue;
double dValue;
......@@ -1517,8 +1515,7 @@ public strictfp class FormattedFloatingDecimal{
* ( 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;
......
......@@ -23,7 +23,7 @@
/*
* @test
* @bug 4160406 4705734 4707389 4826774 4895911 4421494 7021568
* @bug 4160406 4705734 4707389 4826774 4895911 4421494 7021568 7039369
* @summary Test for Double.parseDouble method and acceptance regex
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册