1 | ### arcsinh =====================================================================
|
2 |
|
3 | Tags
|
4 | ----
|
5 | scripting, JS, internal, treenode, general concept
|
6 |
|
7 | Parameters
|
8 | ----------
|
9 | x
|
10 |
|
11 | General description
|
12 | -------------------
|
13 | Returns the inverse hyperbolic sine of x.
|
14 |
|
15 | ###
|
16 |
|
17 | Eval_arcsinh = ->
|
18 | push(cadr(p1))
|
19 | Eval()
|
20 | arcsinh()
|
21 |
|
22 | arcsinh = ->
|
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 |
|