Skip to content

Conversation

@BrunoFenzl
Copy link
Contributor

@BrunoFenzl BrunoFenzl commented Oct 30, 2018

Resolves #236 .

Checklist

Please ensure the following tasks are completed before submitting this pull request.

  • Read, understood, and followed the contributing guidelines, including the relevant style guides.
  • Read and understand the Code of Conduct.
  • Read and understood the licensing terms.
  • Searched for existing issues and pull requests before submitting this pull request.
  • Filed an issue (or an issue already existed) prior to submitting this pull request.
  • Rebased onto latest develop.
  • Submitted against develop branch.

Description

What is the purpose of this pull request?

This pull request:

  • implements the acoth function

Related Issues

Does this pull request have any related issues?

This pull request:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.


@stdlib-js/reviewers

@kgryte kgryte added Feature Issue or pull request for adding a new feature. Math Issue or pull request specific to math functionality. labels Oct 30, 2018
@kgryte kgryte changed the title Implemented method for calculating the inverse hyperbolic cotangent o… Add support for calculating the inverse hyperbolic cotangent (acoth) Oct 30, 2018
Copy link
Member

@kgryte kgryte left a 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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


v = acoth( 2.0 );
// returns ~0.5493

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


```javascript

v = acoth( 2.0 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
v = acoth( 2.0 );
var v = acoth( 2.0 );

@@ -0,0 +1,113 @@
#/
Copy link
Member

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 @@
/**
Copy link
Member

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 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 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 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> var y = {{alias}}( 1.0 )
> y = {{alias}}( 1.0 )

@@ -0,0 +1,57 @@
/**
Copy link
Member

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 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
x = linspace( 1e300, 1e308, 1003 );
x = linspace( 1.0e300, 1.0e308, 1003 );

# Examples

``` julia
julia> x = linspace( -1000, 1000, 2001 );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
julia> x = linspace( -1000, 1000, 2001 );
julia> x = linspace( -1000.0, 1000.0, 2001 );

@kgryte kgryte self-assigned this Oct 30, 2018
@kgryte kgryte merged commit 8bd6bf3 into stdlib-js:develop Oct 30, 2018
@BrunoFenzl
Copy link
Contributor Author

Yeah! That's nice :)
I think I know where to look now when developing new features.
Thanks for your patience and the explanations!

@kgryte
Copy link
Member

kgryte commented Oct 30, 2018

@BrunoFenzl Awesome! If you are planning on working on the other trigonometric function RFCs (e.g., acsch, etc), you'll want to base those efforts on acoth. I did a little bit of clean-up after merge. All-in-all, great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Issue or pull request for adding a new feature. Math Issue or pull request specific to math functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC: add support for computing the inverse hyperbolic cotangent (acoth)

2 participants