Yes, I agree that this function is not generally what is needed. Most of the
time, we want a string and "format" is what should be used. I didn’t wanted to
discuss the decision, I was just curious to know if there exists situations
where it actually gives a wrong result.
Now, in my case, this i
We decided that this variant of round is almost never what you should use. The
stdlib needs to avoid procs that trick you into programming bugs. If you
**really** need it, use this code:
proc myRound*[T: float32|float64](x: T, places: int): T=
if places == 0:
result =
Hello all,
When compiling (with development version of Nim) a module which uses the
"round" function from the "math" module, more precisely the "round" function
with two arguments (the second one being the number of positions after decimal
point), I got a deprecation warning. The recommended wa