-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Add support for calculating the inverse hyperbolic cotangent (acoth) #242
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
Conversation
…f a number, acoth()
kgryte
left a comment
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.
@BrunoFenzl Just a couple minor changes and requests to remove extraneous files. Once these changes are made, this looks ready for merge!
| Computes the [inverse hyperbolic cotangent][inverse-hyperbolic-cotangent] of a `number` (in radians). | ||
|
|
||
| ```javascript | ||
|
|
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.
|
|
||
| v = acoth( 2.0 ); | ||
| // returns ~0.5493 | ||
|
|
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.
|
|
||
| ```javascript | ||
|
|
||
| v = acoth( 2.0 ); |
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.
| v = acoth( 2.0 ); | |
| var v = acoth( 2.0 ); |
| @@ -0,0 +1,113 @@ | |||
| #/ | |||
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.
Cephes does not have an acoth function. This file should be deleted.
| @@ -0,0 +1,139 @@ | |||
| /** | |||
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.
Cephes does not have an acoth function. This file should be deleted.
| -------- | ||
| > var y = {{alias}}( 0.0 ) | ||
| NaN | ||
| > var y = {{alias}}( 0.5 ) |
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.
| > var y = {{alias}}( 0.5 ) | |
| > y = {{alias}}( 0.5 ) |
Once a variable has been declared in a REPL example, no need to redeclare.
| NaN | ||
| > var y = {{alias}}( 0.5 ) | ||
| NaN | ||
| > var y = {{alias}}( 1.0 ) |
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.
| > var y = {{alias}}( 1.0 ) | |
| > y = {{alias}}( 1.0 ) |
| @@ -0,0 +1,57 @@ | |||
| /** | |||
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.
This file should be removed. As no built-in implementation exists, we don't need to measure accuracy differences.
| gen( x, "larger_positive.json" ); | ||
|
|
||
| # Huge positive values: | ||
| x = linspace( 1e300, 1e308, 1003 ); |
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.
| x = linspace( 1e300, 1e308, 1003 ); | |
| x = linspace( 1.0e300, 1.0e308, 1003 ); |
| # Examples | ||
|
|
||
| ``` julia | ||
| julia> x = linspace( -1000, 1000, 2001 ); |
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.
| julia> x = linspace( -1000, 1000, 2001 ); | |
| julia> x = linspace( -1000.0, 1000.0, 2001 ); |
|
Yeah! That's nice :) |
|
@BrunoFenzl Awesome! If you are planning on working on the other trigonometric function RFCs (e.g., |
Resolves #236 .
Checklist
develop.developbranch.Description
This pull request:
acothfunctionRelated Issues
This pull request:
Questions
No.
Other
No.
@stdlib-js/reviewers