Added nans to zeta function.

This commit is contained in:
Till Hoffmann 2016-04-09 20:07:36 +01:00
parent a350c25a39
commit de057ebe54

View File

@ -881,13 +881,14 @@ struct zeta_impl {
const Scalar maxnum = NumTraits<Scalar>::infinity();
const Scalar zero = 0.0, half = 0.5, one = 1.0;
const Scalar machep = igamma_helper<Scalar>::machep();
const Scalar nan = NumTraits<Scalar>::quiet_NaN();
if( x == one )
return maxnum;
if( x < one )
{
return zero;
return nan;
}
if( q <= zero )
@ -899,7 +900,7 @@ struct zeta_impl {
p = x;
r = numext::floor(p);
if (p != r)
return zero;
return nan;
}
/* Permit negative q but continue sum until n+q > +9 .