Description
Version
v20.18.1
Platform
Darwin foo 24.2.0 Darwin Kernel Version 24.2.0: Fri Dec 6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000 arm64
Subsystem
Math
What steps will reproduce the bug?
Math.atan(2.859624123917431)
How often does it reproduce? Is there a required condition?
It happens all the time on Mac OS X.
What is the expected behavior? Why is that the expected behavior?
1.2343920821908787
This is what older versions of node.js returned, and what all versions of node.js on Linux x86 return.
What do you see instead?
1.234392082190879
Additional information
1.234392082190879
is actually the more correct result and agrees with Python and Wolfram Alpha. But the concerning thing is that the result changed between v20.18.0 and v20.18.1 on Mac OS X arm64 only. On Linux x86 all versions return the less correct result of 1.2343920821908787
. It would be nice if node.js on all platforms returned the same value. The difference is small but it is causing some headaches in our unit tests between platforms and node versions.
Here's is what Wolfram Alpha shows with more significant digits:
1.23439208219087881390254524370678138808146132211060418165008615225322232
Activity