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
Little fix after the last commit (mostly a git fail)
[eigenmath-fx.git]
/
expsin.cpp
blob
6756c8de2ed8ddb542ab3c5fd924082515dc72ff
1
// Do the exponential sine function.
2
3
#include
"stdafx.h"
4
#include
"defs.h"
5
6
void
7
eval_expsin
(
void
)
8
{
9
push
(
cadr
(
p1
));
10
eval
();
11
expsin
();
12
}
13
14
void
15
expsin
(
void
)
16
{
17
save
();
18
19
p1
=
pop
();
20
21
push
(
imaginaryunit
);
22
push
(
p1
);
23
multiply
();
24
exponential
();
25
push
(
imaginaryunit
);
26
divide
();
27
push_rational
(
1
,
2
);
28
multiply
();
29
30
push
(
imaginaryunit
);
31
negate
();
32
push
(
p1
);
33
multiply
();
34
exponential
();
35
push
(
imaginaryunit
);
36
divide
();
37
push_rational
(
1
,
2
);
38
multiply
();
39
40
subtract
();
41
42
restore
();
43
}
44
45
#if SELFTEST
46
47
static char
*
s
[] = {
48
49
"expsin(x)"
,
50
"1/2*i*exp(-i*x)-1/2*i*exp(i*x)"
,
51
};
52
53
void
54
test_expsin
(
void
)
55
{
56
test
(
__FILE__
,
s
,
sizeof
s
/
sizeof
(
char
*));
57
}
58
59
#endif