-
-
Notifications
You must be signed in to change notification settings - Fork 620
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
refactor: update math/base/special/atanh
according to the FreeBSD implementation
#3128
base: develop
Are you sure you want to change the base?
Conversation
PR-URL: stdlib-js#3117 Reviewed-by: Philipp Burckhardt <[email protected]> Signed-off-by: stdlib-bot <[email protected]>
Hello! Thank you for your contribution to stdlib. We noticed that the contributing guidelines acknowledgment is missing from your pull request. Here's what you need to do:
This acknowledgment confirms that you've read the guidelines, which include:
We can't review or accept contributions without this acknowledgment. Thank you for your understanding and cooperation. We look forward to reviewing your contribution! |
Coverage Report
The above coverage report was generated for the changes in this PR. |
@RiyaChy072 Thanks for working on this. But, declaring the numbers as constants, and then using them - is not what we actually want to do here. If you check the implementation of |
@gunjjoshi Understood. I will try to rectify that. Thanks |
…into updated-atanh
@gunjjoshi Can you kindly check if it's done or not now? |
math/base/special/atanh
according to the FreeBSD implementation
math/base/special/atanh
according to the FreeBSD implementationmath/base/special/atanh
according to the FreeBSD implementation
/stdlib merge |
Thanks for working on this, @RiyaChy072. However, it looks like this PR still needs some work. Notably, you need to use various stdlib utilities for extracting and setting words, etc, as Gunj mentioned above. My recommendation is to spend some time analyzing other C implementations in math/base/special and then replicating those ideas here. As is, this PR won't be able to move forward. |
@gunjjoshi Can you check if it's done ? |
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.
@RiyaChy072 I don't think we need to change these fixtures for this. Was there any specific reason to update them?
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.
@gunjjoshi I thought that needed to be done, didn't know we don't need that
|
||
if( ax > 1 || stdlib_base_is_nan( x ) ) { // |x|>1 or x is NaN | ||
return 0.0 / 0.0 ; //NaN | ||
} | ||
if ( x == -1.0 ) { | ||
return STDLIB_CONSTANT_FLOAT64_NINF; | ||
|
||
if( ax == 1 ) { // |x| == 1 | ||
return (sgn > 0) ? STDLIB_CONSTANT_FLOAT64_NINF : STDLIB_CONSTANT_FLOAT64_PINF; | ||
} | ||
|
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.
@RiyaChy072 This isn't what we need to do here. As mentioned previously, we need to use various stdlib utilities here, similar to how they are being used in the FreeBSD reference implementation.
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.
@gunjjoshi Can i use HIGH_WORD_ABS_MASK here?
Resolves #2089 .
Description
This pull request:
Related Issues
This pull request:
math/base/special/atanh
according to the FreeBSD implementation #2089Questions
No.
Other
No.
Checklist
@stdlib-js/reviewers