Replacement for snprintf

berni44 dlang at
Wed Oct 30 16:04:10 UTC 2019

On Wednesday, 30 October 2019 at 15:48:44 UTC, Ali Çehreli wrote:
> The tie-breaker is to always round towards the even digit. So 
> it should always produce 1.12, 1.14, etc.

As far as I know that's for avoiding error propagation, when 
intermediate results need to be rounded. When I'm not completely 
mistaken, Donald Knuth prooved that rounding toward even avoids 
errors that might building up using several such steps.

But here there is little chance, that the result will be used for 
new calculations. It's most often used for printing a result that 
humans have to read. This is different.

More information about the Digitalmars-d mailing list