Skip to content

Commit

Permalink
Better complex Gudermannian
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmasson committed Jun 16, 2021
1 parent d10305b commit 5559263
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions build/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -3674,9 +3674,12 @@ function sinc( x ) {

}

function gudermannian( x ) { return arctan( sinh(x) ); }

function inverseGudermannian( x ) { return arctanh( sin(x) ); }
// analyticphysics.com / The Complex Gudermannian Function

function gudermannian( x ) { return mul( 2, arctan( tanh( div(x,2) ) ) ); }

function inverseGudermannian( x ) { return mul( 2, arctanh( tan( div(x,2) ) ) ); }


function zeta( x, tolerance=1e-10 ) {
Expand Down
7 changes: 5 additions & 2 deletions src/functions/trigonometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ function sinc( x ) {

}

function gudermannian( x ) { return arctan( sinh(x) ); }

function inverseGudermannian( x ) { return arctanh( sin(x) ); }
// analyticphysics.com / The Complex Gudermannian Function

function gudermannian( x ) { return mul( 2, arctan( tanh( div(x,2) ) ) ); }

function inverseGudermannian( x ) { return mul( 2, arctanh( tan( div(x,2) ) ) ); }

0 comments on commit 5559263

Please sign in to comment.