diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-09-10 09:57:56 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2007-09-10 09:57:56 (GMT) |
commit | adc9ebd4ac938f16f804943139768b269bf4b497 (patch) | |
tree | 4269b988337ebf0ea06a8a0e740d5ef46bb1b132 /mathlib.py | |
parent | b0cca9f16f0a57ea07c8a27f4421311e96b41680 (diff) |
Bugfixes, plot axes labels, MANIFEST update
Diffstat (limited to 'mathlib.py')
-rw-r--r-- | mathlib.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -252,6 +252,18 @@ class MathLib: def ceil(self, x): return self.d(math.ceil(x)) + def shift_left(self, x, y): + if self.is_int(x) and self.is_int(y): + return self.d(int(x) << int(y)) + else: + return 0 + + def shift_right(self, x, y): + if self.is_int(x) and self.is_int(y): + return self.d(int(x) >> int(y)) + else: + return 0 + def factorize(self, x): if not self.is_int(x): return 0 |