Open
Description
Hi there,
while experimenting with Uiua, I found that e.g. ₙ10 1000 gives the incorrect result of 2.9999999999999996 instead of 3, caused by a rounding error:
ₙ10 1 = 0
ₙ10 10 = 1
ₙ10 100 = 2
ₙ10 1000 = 2.9999999999999996
ₙ10 10000 = 4
ₙ10 100000 = 5
ₙ10 1000000 = 5.999999999999999
ₙ10 10000000 = 7
ₙ10 100000000 = 8
ₙ10 1000000000 = 8.999999999999998
The following test case should uncover the problem:
∵(⍤"ₙ10 failed!" =ₙ10 ⁿ∶10 .) ⇡11
This error can be reproduced in the pad as well as in a locally installed interpreter.
It seems that there is an Issue with Rust's underlying f64/f32 log and that there exists an integer variant that circumvents/fixes the problem. However,
Line 884 in f19ec8b
Jegge