3 ms·
What happens if the price overflows the limit of a 32-bit integer?
by DrScump 11y ago
What happens if the price overflows the limit of a 32-bit integer?
- jph 11y agoIf the price overflows 32-bit, then everyone in SF moves. :) For this script, the fetch returns at most 100 rows, so won't overflow. More broadly, the Num command runs using awk, and number handling depends on your system's awk implementation and C libraries. Current awk implementations use an internal representation of all numbers, including integers, that uses double-precision floating-point numbers. I know GNU awk supports arbitrary precision arithmetic, and also can use --bignum, GNU MPFR and GNU MP (GMP); these will be great additions to the Num command for the next major version upgrade.
- deleted 11y ago[deleted]