'real' not able to store it's largest value

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon May 22 13:29:11 PDT 2017


On Monday, 22 May 2017 at 20:26:27 UTC, colin wrote:
>         writefln!("1024 ^^ %s = %s")(i, real(1024 ^^ i));

You convert to real AFTER doing the exponent on an integer. 
change `real(1024 ^^ i)` to `real(1024) ^^ i` and you should get 
a different result.


More information about the Digitalmars-d-learn mailing list