-
-
Notifications
You must be signed in to change notification settings - Fork 836
feat: add math/base/special/log1pf
#3361
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
Coverage Report
The above coverage report was generated for the changes in this PR. |
v = log1pf( x[ i ] ); | ||
e = float64ToFloat32( expected[ i ] ); | ||
delta = absf( v - e ); | ||
tol = 1.0e07 * EPS * absf( e ); |
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.
tol = 1.0e07 * EPS * absf( e ); | |
tol = 1.0e07 * EPS * absf( e ); |
@kgryte @Planeshifter The JS implementation requires a very large tolerance for numbers in the range -0.9999
to -0.41422
. But, for the C implementation, the required tolerance equals EPS * absf( e )
only. I checked the implementation from the FreeBSD source, but couldn't find the reason.
FreeBSD reference: https://svnweb.freebsd.org/base/release/12.2.0/lib/msun/src/s_log1pf.c?revision=367086&view=markup
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.
Yeah, that is a very large tolerance and would indicate that something is off with the implementation.
@gunjjoshi Sorry, i was not aware that you already open a pr for log1pf. I open one pr of my own which resolve the same issue. If you want to open this pr again as ready for review i will close mine. If not please look into my pr i make the changes in my pr taking reference of this pr. Sorry again i will make sure nothing like this happen again from my side. |
Progresses #649.
Description
This pull request:
math/base/special/log1pf
, which would be the single-precision equivalent formath/base/special/log1p
.Related Issues
This pull request:
Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers