
Stephen C. answered 07/09/19
Tutor
5
(2)
M.S. Math
I think that your compiler defaults to UInt32's for integer constants. When the compiler multiplies 1073741824 by 8, it overflows a UInt32 max value.
To fix the problem, you need to do something like put a "UL" (unsigned long) suffix at the end of constants that can overflow ... like 1073741824UL * 8UL.