任何符合IEEE754(r)的Java实现? [英] Any IEEE754(r) compliant implementations for Java?

查看:660
本文介绍了任何符合IEEE754(r)的Java实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可用于Java的完全兼容的IEEE754r实现,它支持Java选择省略的所有功能(或者一般而言,高级语言通常省略):

< $>

  • 陷阱

  • 粘滞的标记

  • 定向舍入模式
  • long double

  • 四元精度

  • DPD(密集小数)


    在任何人遇到错误之前进行澄清:我不是在寻找JVM来为上述提供任何支持,只是一些在软件中实现类型和操作的类,基本上就是已经存在的类原始封装类Float / Double。

    解决方案

    不存在完全符合IEEE754R的实现。不仅在Java中,而且在所有当前可用的语言(状态2012年7月)。
    $ b 编辑:海报要求IEEE754 R em支持是与IEEE 754-2008相同。如果我想补充说明为什么没有这样的事情,这将是漫长的。




    • 陷阱:不, OVERFLOW,UNDERFLOW,INEXACT等与SIGFPE的例程不是
      a陷阱。参见IEEE754(旧的)。 21为什么构成一个陷阱。
      指示NaNs。 NaN有效载荷访问。国旗访问。
      枚举可以做到这点的语言。


    • 舍入模式:新标准将roundTiesToAway(p。16)定义为新的舍入模式。
      不幸的是,有AFAIK没有处理器支持这种模式,
      也没有软件模拟。

    • 四精度:只有极少数编译器,甚至更少的编译器都没有被破坏。

    • 密集打包的小数:可能只支持使用小数的语言,
      eg COBOL




    所有集合的交集:空集。没有。没什么。


    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.

    这篇关于任何符合IEEE754(r)的Java实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆