UNPKG
php.js
Version:
latest (0.1.1)
0.1.1
0.1.0
Use phpjs functions as required.
php.js
/
cosh.js
10 lines
(8 loc)
•
303 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
module
.
exports
=
function
(
){
return
cosh.
apply
(
exports
,
arguments
) };
function
cosh
(
arg
) {
// discuss at: http://phpjs.org/functions/cosh/
// original by: Onno Marsman
// example 1: cosh(-0.18127180117607017);
// returns 1: 1.0164747716114113
return
(
Math
.
exp
(arg) +
Math
.
exp
(-arg)) /
2
; }