![]() |
|
Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Perl returns NaN after additionby syphilis (Archbishop) |
on Oct 17, 2013 at 01:35 UTC ( [id://1058577]=note: print w/replies, xml ) | Need Help?? |
Could it be that it's too large for perl? or it could be a non-numeric variable in the data file, so how would I test for that? You can get a result of "NaN" by doing addition *only* if one (or more) of the values being summed is a NaN. I would therefore check the terms being added to see if any of them match the regex /^nan/i . Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|