We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15fe7c0 commit 8bcda36Copy full SHA for 8bcda36
lib/node_modules/@stdlib/math/base/special/bernoulli/src/main.c
@@ -174,7 +174,7 @@ double stdlib_base_bernoulli( const double n ) {
174
if ( !stdlib_base_is_nonnegative_integer( n ) ) {
175
return 0.0 / 0.0; // NaN
176
}
177
- if ( n == 1 ) {
+ if ( n == 1.0 ) {
178
return 0.5;
179
180
if ( stdlib_base_is_odd( n ) ) {
@@ -183,5 +183,5 @@ double stdlib_base_bernoulli( const double n ) {
183
if ( n > MAX_BERNOULLI ) {
184
return ( stdlib_base_is_odd( n/2.0 ) ) ? STDLIB_CONSTANT_FLOAT64_PINF : STDLIB_CONSTANT_FLOAT64_NINF;
185
186
- return bernoulli_value[ (size_t)( n / 2 ) ];
+ return bernoulli_value[ (size_t)( n / 2.0 ) ];
187
0 commit comments