exp() precision between Mac OS and Windows

后端 未结 1 674
终归单人心
终归单人心 2021-01-25 05:54

I got a code here, and when I run them on Win and Mac OS, the precision of the results is different, anyone can help?

const         


        
相关标签:
1条回答
  • 2021-01-25 06:18

    How Can I get the same result.

    Unless the math library on OS X uses the very same implementation/algorithm for calculating e ^ x, you won't and can't really get exactly the same results. Floating-point calculations aren't exact, deal with it.

    0 讨论(0)
提交回复
热议问题