Will floating point operations on the JVM give the same results on all platforms?

后端 未结 3 1534
暖寄归人
暖寄归人 2021-01-31 07:02

I\'m using Java in an application running on multiple machines, and all machines need to get the same results for mathematical operations. Is it safe to use Java\'s floating poi

3条回答
  •  日久生厌
    2021-01-31 07:42

    In addition to strictfp, there's also StrictMath which requires that the results be predictable for transcendental and other functions.

提交回复
热议问题