in reply to Q: NaN again

NaN is a feature of the IEEE format Perl (and C and VB and ...) use to represent floating point numbers. It's supported by the CPU/FPU. It's impossible to remove support for it from Perl, since an XS module could return NaN and Perl wouldn't know how to handle it. ( Of course, it's possible to change Perl to handle NaN differently. But really, not the way to go. )

If you don't want your script's users to specify NaN, check to make sure they didn't specify NaN.