Skip to content

Commit

Permalink
Add lemniscate functions
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmasson committed Jan 25, 2025
1 parent 3ac46c3 commit 28f5d61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/math.js
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,10 @@ function cd( x, m ) { return div( cn(x,m), dn(x,m) ); }

function dc( x, m ) { return div( dn(x,m), cn(x,m) ); }

function lemniscateSin( x ) { return sn(x,-1); }

function lemniscateCos( x ) { return dn(x,2); }


function weierstrassRoots( g2, g3 ) {

Expand Down
4 changes: 4 additions & 0 deletions docs/functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ <h1>Elliptic Functions</h1>

<p><b>dc( <i>x</i>, <i>m</i> )</b> &mdash; ratio of Jacobi elliptic delta amplitude and cosine of a real or complex number with real or complex elliptic parameter <i>m</i></p>

<p><b>lemniscateSin( <i>x</i> )</b> &mdash; lemniscate sine of a real or complex number</p>

<p><b>lemniscateCos( <i>x</i> )</b> &mdash; lemniscate cosine of a real or complex number</p>

<p><b>weierstrassRoots( <i>g</i><sub>2</sub>, <i>g</i><sub>3</sub> )</b> &mdash; Weierstrass roots <i>e</i><sub>1</sub>, <i>e</i><sub>2</sub> and <i>e</i><sub>3</sub> for real or complex invariants. Returned as an array.</p>

<p><b>weierstrassHalfPeriods( <i>g</i><sub>2</sub>, <i>g</i><sub>3</sub> )</b> &mdash; Weierstrass half periods <i>w</i><sub>1</sub> and <i>w</i><sub>2</sub> for real or complex invariants. Returned as an array. Consistent with evaluation of Weierstrass elliptic function in terms of Jacobi elliptic sine.</p>
Expand Down
4 changes: 4 additions & 0 deletions src/functions/elliptic-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ function cd( x, m ) { return div( cn(x,m), dn(x,m) ); }

function dc( x, m ) { return div( dn(x,m), cn(x,m) ); }

function lemniscateSin( x ) { return sn(x,-1); }

function lemniscateCos( x ) { return dn(x,2); }


function weierstrassRoots( g2, g3 ) {

Expand Down

0 comments on commit 28f5d61

Please sign in to comment.