whitespace fix
[sympyx.git] / q.py
blob901ff6cfec102d03f61408bb99ca4752bd0f1a50
1 #!/usr/bin/env python
2 from timeit import default_timer as clock
3 from sympy import *
6 class sin(Basic):
8 def __new__(cls, arg):
9 if arg == 0:
10 return Integer(0)
11 else:
12 obj = Basic.__new__(cls, (arg,))
13 return obj
15 def __repr__(self):
16 return "sin(%s)" % self.args[0]
18 def expand(self):
19 print "expand called"
20 return self
23 x = Symbol("x")
24 print ((sin(1)+sin(0)+x)**2).expand()