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