-
-
Notifications
You must be signed in to change notification settings - Fork 813
feat: add math/base/special/ceilnf
#4107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
} | ||
// If we overflow, return `x`, as the number of digits to the right of the decimal is too small (i.e., `x` is too large / lacks sufficient fractional precision) for there to be any effect when rounding... | ||
if ( n < STDLIB_CONSTANT_FLOAT32_MIN_BASE10_EXPONENT ) { | ||
s = stdlib_base_pow( 10.0f, -( n + STDLIB_CONSTANT_FLOAT32_MAX_BASE10_EXPONENT ) ); // TODO: replace use of `pow` once have stdlib equivalent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will either use stdlib_base_exp2f
for which I'll have to wait for the PR on it to be merged or add implementations for powf
then update this again.
The test cases are failing as the ranges exceed the float limit upon deriving the values after pow()
.
// VARIABLES // | ||
|
||
static const float MAX_INT = STDLIB_CONSTANT_FLOAT32_MAX_SAFE_INTEGER + 1.0f; | ||
static const float HUGE_VALUE = 1.0e+38f; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adjusted the range to suit float operations!!
/stdlib update-copyright-years |
Progresses #649 .
Description
This pull request:
math/base/special/ceilnf
Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers