On Thursday, 29 November 2018 at 07:07:06 UTC, Murilo wrote:
I am using the function pow() from std.math but if I try pow(2, 32) it returns 0, it doesn't compute beyond the maximum value of an int(2^31) and I am working with long. What should I do?

what exactly is your input?

´´´
import std.stdio;
import std.experimental.all;

void main()
{
        long u = 2;
        assert(pow(u,32) == 4294967296);
        assert(pow(2UL,32) == 4294967296);
}
´´´

Reply via email to