
Large integer value in numeric wave
I encountered an issue working with large integer value in numeric wave.
It appears that when the a number larger than 2^24 is stored in numeric wave, it can be off.
For example, I was expecting the values in wave0 to be 16777216, 16777217, 16777218, and 16777219 if I run the following commands. However, they are actually 16777216, 16777216, 16777218, and 16777220.
make/n=4 wave0 wave0 = p + 2^24
My question is, how do I handle this properly if I need the last digit precision.
make without /D creates a single-precision floating point number, which is a 32-bit value.
The mantissa part of a single-precision float is only 23 bits. The other 9 bits are sign and exponent:
A google AI result is correct:
Use Make/O/D to increase the mantissa size to 53 bits.
September 19, 2025 at 06:49 pm - Permalink