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]
/
defint.cpp
blob
e06606e2eb4b8b0d071af362b972a7fffc350777
1
// definite integral
2
3
#include
"stdafx.h"
4
#include
"defs.h"
5
6
#define F p2
7
#define X p3
8
#define A p4
9
#define B p5
10
11
void
12
eval_defint
(
void
)
13
{
14
push
(
cadr
(
p1
));
15
eval
();
16
F
=
pop
();
17
18
p1
=
cddr
(
p1
);
19
20
while
(
iscons
(
p1
)) {
21
22
push
(
car
(
p1
));
23
p1
=
cdr
(
p1
);
24
eval
();
25
X
=
pop
();
26
27
push
(
car
(
p1
));
28
p1
=
cdr
(
p1
);
29
eval
();
30
A
=
pop
();
31
32
push
(
car
(
p1
));
33
p1
=
cdr
(
p1
);
34
eval
();
35
B
=
pop
();
36
37
push
(
F
);
38
push
(
X
);
39
integral
();
40
F
=
pop
();
41
42
push
(
F
);
43
push
(
X
);
44
push
(
B
);
45
subst
();
46
eval
();
47
48
push
(
F
);
49
push
(
X
);
50
push
(
A
);
51
subst
();
52
eval
();
53
54
subtract
();
55
F
=
pop
();
56
}
57
58
push
(
F
);
59
}