java ieee,任何符合IEEE754(r)的Java实现?

这篇内容指出,截至2012年7月,无论是Java还是其他主流编程语言,都不存在完全符合IEEE754R标准的实现。这个标准包括了异常处理、精确浮点运算、特殊数值(如四倍精度和压缩十进制)等特性,而这些在大多数语言中都被忽略了。目前没有软件库提供这些功能,尤其是Java中。
摘要由CSDN通过智能技术生成

Are there any fully compliant IEEE754r implementations available for Java that offer support for all the features Java chose to omit (or rather high level languages in general like to omit):

Traps

Sticky flags

Directed rounding modes

Extended/long double

Quad precision

DPD (densly packed decimals)

Clarification before anyone gets it wrong: I'm not looking for the JVM to offer any support for the above, just some classes that do implement the types and operations in software, basically something in the style of the already existing primitve wrapper classes Float/Double.

解决方案

No, there does not exist a fully compliant IEEE754R implementation. Not only in Java, but in all currently available languages (Status July 2012).

EDIT: The poster asked for IEEE754 R support which is identical to IEEE 754-2008. If I want to add all reasons why there is no such thing, this would be long.

Traps: No, calling own routines with OVERFLOW, UNDERFLOW, INEXACT etc. with SIGFPE is not

a trap. See IEEE754 (the old one) p. 21 for what constitutes a trap.

Signaling NaNs. NaN payload access. Flag access.

Enumerate languages which can do that.

Rounding modes: The new standard defines roundTiesToAway (p. 16) as new rounding mode.

Unfortunately there are AFAIK no processors which supports this mode and

no software emulation either.

Quad precision: Only supported in very few compilers and even less compilers which are not broken.

Densely packed Decimals: Will probably only supported in languages which use decimals,

e.g. COBOL.

Intersection of all sets: Empty set. None. Nothing.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值