oppiliappan/eva

--fix appears to truncate versus round

Closed this issue · 3 comments

wezm commented
$ eva -f 1
> .1 + 4
         4.0
$ eva '.1 + 4'
         4.0999999999

I would have expected the result to be rounded to the specified number of decimal places (and produce 4.1) instead of truncated.

Thanks for reporting this, it seemed to be a bug on the radix formatting part.

Fixed for base 10 but other bases might still have this issue, not sure.

wezm commented

Awesome, thanks.