I found a bug in SafeREPL the function round does not work!

Have a look at this: PSA: floating-point arithmetic. It discusses rounding and printing for Float64 numbers, but BigFloats are the same, just with more digits.

As Ahmed_Salih said, what you’re seeing is that the closest BigFloat (at default precision) to the decimal number 1.2 is not exactly 1.2, but some base-2 rational number that differs from 1.2 by something like 1e-77.

4 Likes