mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Added nans to zeta function.
This commit is contained in:
parent
a350c25a39
commit
de057ebe54
@ -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 .
|
||||
|
Loading…
Reference in New Issue
Block a user