You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, a mathematically more precise value is $\log(2\pi) \approx 1.83787706640934548356065947281123527972279494727556682563430308096553139185$
This is better rounded to the 64bit value
1.8378770664093456
which means the current value has an unnecessary error in the order of E-16.
I guess there could be a similar type of issue for other constants as well.
I suppose this is pretty much negligible for any practical purpose and perhaps one may argue the current implementation is better readable. But my OCD is kinda forcing me to point this out haha
The text was updated successfully, but these errors were encountered:
In constants.hpp, I noticed there are some constants that get a small unnecessary rounding error due to how they are defined.
For example, with 64bit precision floating point, we have:
LOG_TWO_PI = LOG_TWO + LOG_PI = 0.6931471805599453 + 1.1447298858494002 =
1.8378770664093453
However, a mathematically more precise value is $\log(2\pi) \approx 1.83787706640934548356065947281123527972279494727556682563430308096553139185$
This is better rounded to the 64bit value
1.8378770664093456
which means the current value has an unnecessary error in the order of E-16.
I guess there could be a similar type of issue for other constants as well.
I suppose this is pretty much negligible for any practical purpose and perhaps one may argue the current implementation is better readable. But my OCD is kinda forcing me to point this out haha
The text was updated successfully, but these errors were encountered: