Check for NaN/infinite values in s48_double_to_bignum

slava 2006-12-04 05:19:33 +00:00
parent e8ddc09ab5
commit f0d353558e
1 changed files with 1 additions and 0 deletions

View File

@ -421,6 +421,7 @@ s48_bignum_to_double(bignum_type bignum)
bignum_type
s48_double_to_bignum(double x)
{
if (!isnormal(x)) return (BIGNUM_ZERO ());
int exponent;
double significand = (frexp (x, (&exponent)));
if (exponent <= 0) return (BIGNUM_ZERO ());