Thanks for the link to the Stackoverflow discussion. Currently there are three answers: two (correctly) answer that the constant as given is the most accurate value for IEEE-754 floats.
Tim Peters has answered that: https://stackoverflow.com/a/48653387
"Either way, the code ensures the best 53-bit approximation to log(2) will be used."
so there is no other value that ln2 can be given that is more accurate given the limitation of 53-bits.
https://stackoverflow.com/a/48653387
The difference between the given value and the mathematically precise value is not a bug but intentional. I'm not closing this ticket as I think that this should be documented in the source, to prevent future confusion. |