"\n" }'
-inf -1 -0.0 0.0 inf nan 1 1.0 1.0 2.0 +inf +nan -nan
From this we see that the strings "nan" and "inf" are converted to ZERO.
This seems to be related to the function `is_ieee_magic_val`
which is
part of core.c.
Is this expected behaviour? I.e. are "nan" and "inf" to be understood as
strings and not strings with magic ieee values such as "+nan", or is this
an oversight? I'm thinking here about the following case :
$ awk 'BEGIN{print -sqrt(-1)}'
which outputs "nan" and not "+nan".
Link to Stack Overflow question :
https://stackoverflow.com/q/51056836/8344060
With kind regards,
Klaas