repo.or.cz
/
sympyx.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Debugging prints added
[sympyx.git]
/
r.py
blob
99f7467a51c78cf621d4dbd07cfd92cea3bb08e4
1
#!/usr/bin/env python
2
from
timeit
import
default_timer
as
clock
3
from
sympy
import
Symbol
,
Add
,
Mul
,
Integer
,
multinomial_coefficients
4
5
N
=
20
6
7
x
=
Symbol
(
"x"
)
8
y
=
Symbol
(
"y"
)
9
z
=
Symbol
(
"z"
)
10
11
e
= (
x
+
y
+
z
+
1
)**
N
12
13
t_tot
=
clock
()
14
f
= (
e
*(
e
+
1
)).
expand
()
15
#f = (e).expand()
16
t_tot
=
clock
()-
t_tot
17
18
print
"done"
19
20
print
"# of terms:"
,
len
(
f
.
args
)
21
print
"total time2:"
,
t_tot