Skip to content

Commit ac6c283

Browse files
committed
docs: use constants/float64/max-ln
1 parent e5d32c5 commit ac6c283

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

lib/node_modules/@stdlib/math/base/special/riemann-zeta/include/stdlib/math/base/special/riemann_zeta.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C" {
2929
/**
3030
* Evaluates the Riemann zeta function.
3131
*/
32-
double stdlib_base_zeta( const double x );
32+
double stdlib_base_zeta( const double s );
3333

3434
#ifdef __cplusplus
3535
}

lib/node_modules/@stdlib/math/base/special/riemann-zeta/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ var TWO_PI = require( '@stdlib/constants/float64/two-pi' );
4949
var SQRT_EPSILON = require( '@stdlib/constants/float64/sqrt-eps' );
5050
var LN_SQRT_TWO_PI = require( '@stdlib/constants/float64/ln-sqrt-two-pi' );
5151
var MAX_SAFE_NTH_FACTORIAL = require( '@stdlib/constants/float64/max-safe-nth-factorial' );
52+
var FLOAT64_MAX_LN = require( '@stdlib/constants/float64/max-ln' );
5253
var ODD_POSITIVE_INTEGERS = require( './odd_positive_integers.json' );
5354
var EVEN_NONNEGATIVE_INTEGERS = require( './even_nonnegative_integers.json' );
5455
var BERNOULLI = require( './bernoulli.json' );
@@ -63,7 +64,6 @@ var rateval6 = require( './rational_p6q6.js' );
6364
// VARIABLES //
6465

6566
var MAX_BERNOULLI_2N = 129;
66-
var MAX_LN = 709; // TODO: consider making external constant
6767
var Y1 = 1.2433929443359375;
6868
var Y3 = 0.6986598968505859375;
6969

@@ -265,7 +265,7 @@ function zeta( s ) {
265265
tmp = sinpi( 0.5*sc ) * 2.0 * zeta( s );
266266
r = gammaln( s );
267267
r -= s * ln( TWO_PI );
268-
if ( r > MAX_LN ) {
268+
if ( r > floor( FLOAT64_MAX_LN ) ) {
269269
return ( tmp < 0.0 ) ? NINF : PINF;
270270
}
271271
return tmp * exp( r );

lib/node_modules/@stdlib/math/base/special/riemann-zeta/manifest.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
"@stdlib/constants/float64/two-pi",
5353
"@stdlib/constants/float64/sqrt-eps",
5454
"@stdlib/constants/float64/ln-sqrt-two-pi",
55-
"@stdlib/constants/float64/max-safe-nth-factorial"
55+
"@stdlib/constants/float64/max-safe-nth-factorial",
56+
"@stdlib/constants/float64/max-ln"
5657
]
5758
},
5859
{
@@ -81,7 +82,8 @@
8182
"@stdlib/constants/float64/two-pi",
8283
"@stdlib/constants/float64/sqrt-eps",
8384
"@stdlib/constants/float64/ln-sqrt-two-pi",
84-
"@stdlib/constants/float64/max-safe-nth-factorial"
85+
"@stdlib/constants/float64/max-safe-nth-factorial",
86+
"@stdlib/constants/float64/max-ln"
8587
]
8688
},
8789
{
@@ -110,7 +112,8 @@
110112
"@stdlib/constants/float64/two-pi",
111113
"@stdlib/constants/float64/sqrt-eps",
112114
"@stdlib/constants/float64/ln-sqrt-two-pi",
113-
"@stdlib/constants/float64/max-safe-nth-factorial"
115+
"@stdlib/constants/float64/max-safe-nth-factorial",
116+
"@stdlib/constants/float64/max-ln"
114117
]
115118
}
116119
]

lib/node_modules/@stdlib/math/base/special/riemann-zeta/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
#include "stdlib/constants/float64/sqrt_eps.h"
4848
#include "stdlib/constants/float64/ln_sqrt_two_pi.h"
4949
#include "stdlib/constants/float64/max_safe_nth_factorial.h"
50+
#include "stdlib/constants/float64/max_ln.h"
5051
#include <stdint.h>
5152

5253
static const int32_t MAX_BERNOULLI_2N = 129;
53-
static const double MAX_LN = 709.0;
5454
static const double Y1 = 1.2433929443359375;
5555
static const double Y3 = 0.6986598968505859375;
5656

@@ -772,7 +772,7 @@ double stdlib_base_zeta( const double s ) {
772772
tmp = stdlib_base_sinpi( 0.5 * sc ) * 2.0 * stdlib_base_zeta( scc );
773773
r = stdlib_base_gammaln( scc );
774774
r -= scc * stdlib_base_ln( STDLIB_CONSTANT_FLOAT64_TWO_PI );
775-
if ( r > MAX_LN ) {
775+
if ( r > stdlib_base_floor( STDLIB_CONSTANT_FLOAT64_MAX_LN ) ) {
776776
return ( tmp < 0.0 ) ? STDLIB_CONSTANT_FLOAT64_NINF : STDLIB_CONSTANT_FLOAT64_PINF;
777777
}
778778
return tmp * stdlib_base_exp( r );

0 commit comments

Comments
 (0)