Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
4ba64fc9
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4ba64fc9
编写于
4月 26, 2011
作者:
D
darcy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7039369: Limit range of strictfp in FloatingDecimal
Summary: Additional reviews by sergey.kuksenko@oracle.com Reviewed-by: alanb
上级
7047ec9f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
15 deletion
+9
-15
src/share/classes/sun/misc/FloatingDecimal.java
src/share/classes/sun/misc/FloatingDecimal.java
+4
-7
src/share/classes/sun/misc/FormattedFloatingDecimal.java
src/share/classes/sun/misc/FormattedFloatingDecimal.java
+4
-7
test/java/lang/Double/ParseDouble.java
test/java/lang/Double/ParseDouble.java
+1
-1
未找到文件。
src/share/classes/sun/misc/FloatingDecimal.java
浏览文件 @
4ba64fc9
...
...
@@ -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
;
...
...
src/share/classes/sun/misc/FormattedFloatingDecimal.java
浏览文件 @
4ba64fc9
...
...
@@ -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
;
...
...
test/java/lang/Double/ParseDouble.java
浏览文件 @
4ba64fc9
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录