repo.or.cz
/
sympy.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
polishing function.py, had to fail another 2 tests in pretty printing
[sympy.git]
/
examples
/
substitution.py
blob
b7f34be693ded858d86356cb509c6780e6f89dff
1
import
sys
2
sys
.
path
.
append
(
".."
)
3
4
import
sympy
5
x
=
sympy
.
Symbol
(
'x'
)
6
y
=
sympy
.
Symbol
(
'y'
)
7
e
=
1
/
sympy
.
cos
(
x
)
8
print
e
9
print
e
.
subs
(
sympy
.
cos
(
x
),
y
)
10
print
e
.
subs
(
sympy
.
cos
(
x
),
y
).
subs
(
y
,
x
**
2
)
11
e
=
1
/
sympy
.
log
(
x
)
12
e
=
e
.
subs
(
x
,
sympy
.
Real
(
"2.71828"
))
13
print
e
14
print
e
.
evalf
()