I'm using Perl to calculate a p-value, and I'm getting "nan" as a result. Does this mean my values are too small, or am I doing something else wrong? When does Perl return "nan" instead of a number? Is it a computational limitation?
When does Perl return "nan" instead of a number?
Check to see that you are working with valid numbers and valid operations. Most Perl NAN errors are failures to interpret the string into a number or invalid mathematical operations. Also, how many digits of precision are you gunning for? I don't think you can expect common variables to hold the infinite number of digits in Pi though I'm not sure if it would produce a NaN. Does your version of Perl produce any payload with the NaN message that you could work with?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment