Explicit typecasting to avoid a bug where Pr is occasionally reported as NaN.
Merge pull request #2 from flimzy/pr-nan

Explicit typecasting to avoid a bug where Pr is occasionally reported as NaN