java中strictfp么意思_什么时候应该在java中使用“strictfp”关键字?

Strictfp确保您从每个平台上的浮点计算获得完全相同的结果。如果不使用strictfp,JVM实现可以在可用的地方使用额外的精度。

Within an FP-strict expression, all

intermediate values must be elements

of the float value set or the double

value set, implying that the results

of all FP-strict expressions must be

those predicted by IEEE 754 arithmetic

on operands represented using single

and double formats. Within an

expression that is not FP-strict, some

leeway is granted for an

implementation to use an extended

exponent range to represent

intermediate results; the net effect,

roughly speaking, is that a

calculation might produce “the correct

answer” in situations where exclusive

use of the float value set or double

value set might result in overflow or

underflow.

换句话说,它是关于确保一次写入一次运行实际上意味着一次写的同时获取错误结果无处不在。

使用strictfp你的结果是可移植的,没有它,他们是更可能是准确的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值