diff --git a/build/math.js b/build/math.js index 59a3ea6..671be6f 100644 --- a/build/math.js +++ b/build/math.js @@ -3674,6 +3674,10 @@ function sinc( x ) { } +function haversine( x ) { return div( sub( 1, cos(x) ), 2 ); } + +function inverseHaversine( x ) { return arccos( sub( 1, mul(2,x) ) ); } + // analyticphysics.com / The Complex Gudermannian Function diff --git a/docs/functions.html b/docs/functions.html index 8f08553..89ac23c 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -70,6 +70,10 @@
sinc( x ) — cardinal sine of a real or complex number
+haversine( x ) — haversine of a real or complex number
+ +inverseHaversine( x ) — inverse haversine of a real or complex number
+