[ prog / sol / mona ]

prog


LISP Puzzles

30 2020-04-09 11:47

>>29
The issue was that I naively assumed large integer support to be permanently active. It needs to be explicitly requested with -M or gawk will mangle your large integers. Since the -M option effectively means "do not mangle my large integers", the gawk authors might claim it to be a "feature", rather than its implicit absence a bug.

$ echo "50000940106333921296" | gawk '{printf "%d\n", $1}'
50000940106333921280
$ echo "50000940106333921296" | gawk -M '{printf "%d\n", $1}'
50000940106333921296

https://www.gnu.org/software/gawk/manual/html_node/Arbitrary-Precision-Integers.html

157


VIP:

do not edit these