Skip to content

Commit 9b3a5c1

Browse files
updated main.c
1 parent 3c9f6ff commit 9b3a5c1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/node_modules/@stdlib/math/base/special/expf/src/addon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
#include "stdlib/math/base/special/expf.h"
2222

2323
// cppcheck-suppress shadowFunction
24-
STDLIB_MATH_BASE_NAPI_MODULE_D_D( stdlib_base_expf )
24+
STDLIB_MATH_BASE_NAPI_MODULE_C_C( stdlib_base_expf )

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,11 @@ static float expmulti( const float hi, const float lo, const int32_t k ) {
9797
t = r * r;
9898
c = r - ( t * polyval_p( t ) );
9999
y = 1.0 - ( lo - ( ( r * c ) / ( 2.0 - c ) ) - hi );
100-
101-
return stdlib_base_ldexpf( y, k + 100 ) * twom100 * twom100;
100+
if ( k >= -125 ) {
101+
return stdlib_base_ldexpf( y, k );
102+
} else {
103+
return stdlib_base_ldexpf( y, k + 100 ) * twom100 * twom100;
104+
}
102105
}
103106

104107
/**

0 commit comments

Comments
 (0)