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
This is how floating point numbers work. The epsilon near MaxFloat64 is huge, around 10^292. Subtracting values much smaller than that will return the same value you subtracted from.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
While implementing polynomial remainders for primality testing, I discovered the subtraction operator does not work for sufficiently large Float64.
Link to replication: https://go.dev/play/p/ET1J7tyoJTe
What did you expect to see?
I expect to see the right operand to be subtracted from the left operand
What did you see instead?
No subtraction took place.
The text was updated successfully, but these errors were encountered: