repo.or.cz
/
eigenmath-fx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
A (very) few UI improvements
[eigenmath-fx.git]
/
arccosh.cpp
blob
fe4372138c9ee7747d50bdbfa5ea180a6368d814
1
#include
"stdafx.h"
2
#include
"defs.h"
3
4
void
5
eval_arccosh
(
void
)
6
{
7
push
(
cadr
(
p1
));
8
eval
();
9
arccosh
();
10
}
11
12
void
13
arccosh
(
void
)
14
{
15
double
d
;
16
save
();
17
p1
=
pop
();
18
if
(
car
(
p1
) ==
symbol
(
COSH
)) {
19
push
(
cadr
(
p1
));
20
restore
();
21
return
;
22
}
23
if
(
isdouble
(
p1
)) {
24
d
=
p1
->
u
.
d
;
25
if
(
d
<
1.0
)
26
stop
(
"arccosh function argument is less than 1.0"
);
27
d
=
log
(
d
+
sqrt
(
d
*
d
-
1.0
));
28
push_double
(
d
);
29
restore
();
30
return
;
31
}
32
if
(
isplusone
(
p1
)) {
33
push
(
zero
);
34
restore
();
35
return
;
36
}
37
push_symbol
(
ARCCOSH
);
38
push
(
p1
);
39
list
(
2
);
40
restore
();
41
}