Promotion rules ... why no float?

Lodovico Giaretta via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 7 08:12:23 PDT 2016


On Wednesday, 7 September 2016 at 15:09:42 UTC, Lodovico Giaretta 
wrote:
> x == x/k + x%k

Of course that was:

x == (x/k)*k + x%k

But ok, you got the idea: going back and forth is lossless, just 
remember to add the modulus.


More information about the Digitalmars-d mailing list