Skip to content

Commit 8bcda36

Browse files
authored
Apply suggestions from code review
Signed-off-by: Athan <[email protected]>
1 parent 15fe7c0 commit 8bcda36

File tree

1 file changed

+2
-2
lines changed
  • lib/node_modules/@stdlib/math/base/special/bernoulli/src

1 file changed

+2
-2
lines changed

lib/node_modules/@stdlib/math/base/special/bernoulli/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ double stdlib_base_bernoulli( const double n ) {
174174
if ( !stdlib_base_is_nonnegative_integer( n ) ) {
175175
return 0.0 / 0.0; // NaN
176176
}
177-
if ( n == 1 ) {
177+
if ( n == 1.0 ) {
178178
return 0.5;
179179
}
180180
if ( stdlib_base_is_odd( n ) ) {
@@ -183,5 +183,5 @@ double stdlib_base_bernoulli( const double n ) {
183183
if ( n > MAX_BERNOULLI ) {
184184
return ( stdlib_base_is_odd( n/2.0 ) ) ? STDLIB_CONSTANT_FLOAT64_PINF : STDLIB_CONSTANT_FLOAT64_NINF;
185185
}
186-
return bernoulli_value[ (size_t)( n / 2 ) ];
186+
return bernoulli_value[ (size_t)( n / 2.0 ) ];
187187
}

0 commit comments

Comments
 (0)