Little fix after the last commit (mostly a git fail)
[eigenmath-fx.git] / arcsinh.cpp
blobd6534fab708c5b8f4b74a7b6f8a998e939144cf5
1 #include "stdafx.h"
2 #include "defs.h"
4 void
5 eval_arcsinh(void)
7 push(cadr(p1));
8 eval();
9 arcsinh();
12 void
13 arcsinh(void)
15 double d;
16 save();
17 p1 = pop();
18 if (car(p1) == symbol(SINH)) {
19 push(cadr(p1));
20 restore();
21 return;
23 if (isdouble(p1)) {
24 d = p1->u.d;
25 d = log(d + sqrt(d * d + 1.0));
26 push_double(d);
27 restore();
28 return;
30 if (iszero(p1)) {
31 push(zero);
32 restore();
33 return;
35 push_symbol(ARCSINH);
36 push(p1);
37 list(2);
38 restore();