Round base parameter julia behaviour

can someone explain me how the base parameter works on round function: Mathematics · The Julia Language

why round(1456.67884565647, digits=5, base=2) results 1456.6875 for example

thanks

In your example, you asked for 1456.67884565647 rounded to 5 base 2 digits, or the nearest 1/2^5=1/32.

julia> .67884565647 * 32
21.72306100704

The round operation results in 1456 + 22/32 = 1456.6875.

4 Likes