Skip to content

Commit 433bb99

Browse files
committed
fix: move addition by one into the sqrt invocation
1 parent 8b20f6a commit 433bb99

File tree

1 file changed

+4
-4
lines changed
  • lib/node_modules/@stdlib/math/base/special/fast/asinh/src

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
* // returns 0.0
3535
*/
3636
double stdlib_base_fast_asinh( const double x ) {
37-
if ( x > 0.0 ) {
38-
return stdlib_base_ln( x + ( stdlib_base_sqrt( x * x ) + 1.0 ) );
39-
}
4037
if ( x == 0.0 || stdlib_base_is_nan( x ) || stdlib_base_is_infinite( x ) ) {
4138
return x;
4239
}
43-
return -stdlib_base_ln( -x + (stdlib_base_sqrt( x * x ) + 1.0 ) );
40+
if ( x > 0.0 ) {
41+
return stdlib_base_ln( x + ( stdlib_base_sqrt( (x*x) + 1.0 ) ) );
42+
}
43+
return -stdlib_base_ln( -x + ( stdlib_base_sqrt( (x*x) + 1.0 ) ) );
4444
}

0 commit comments

Comments
 (0)