UNPKG

641 Btext/coffeescriptView Raw
1### arcsinh =====================================================================
2
3Tags
4----
5scripting, JS, internal, treenode, general concept
6
7Parameters
8----------
9x
10
11General description
12-------------------
13Returns the inverse hyperbolic sine of x.
14
15###
16
17Eval_arcsinh = ->
18 push(cadr(p1))
19 Eval()
20 arcsinh()
21
22arcsinh = ->
23 d = 0.0
24 save()
25 p1 = pop()
26 if (car(p1) == symbol(SINH))
27 push(cadr(p1))
28 restore()
29 return
30
31 if (isdouble(p1))
32 d = p1.d
33 d = Math.log(d + Math.sqrt(d * d + 1.0))
34 push_double(d)
35 restore()
36 return
37
38 if (iszero(p1))
39 push(zero)
40 restore()
41 return
42
43 push_symbol(ARCSINH)
44 push(p1)
45 list(2)
46 restore()
47
48