Incorrect significant figure rounding
When rounding using significant figures, the number is truncated instead of being rounded. For example
12.9 to 2 sf
outputs 12 instead of 13
Thanks for the report, this would definitely be good to fix.
also to <n> dp is also truncating but I don't what is the intended behavior of that
@printfn Do you intent to fix it by yourself in the near future ?
If not. I would be willing to fix it. However, after looking into the code for that, I came to the conclusion that making sf rounding work will take me a while to get it right.
What are thoughts about it ?
@printfn also should regular rounding be preferred over to truncation for the to dp rounding mode? If so, should a truncation rounding mode be introduced?
I think both to dp and to sf should round correctly. Supporting optional truncation would be nice too, but less important than getting the rounding right.
https://github.com/printfn/fend/pull/373