Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/mathlib.py
diff options
context:
space:
mode:
authorReinier Heeres <reinier@heeres.eu>2007-09-10 09:57:56 (GMT)
committer Reinier Heeres <reinier@heeres.eu>2007-09-10 09:57:56 (GMT)
commitadc9ebd4ac938f16f804943139768b269bf4b497 (patch)
tree4269b988337ebf0ea06a8a0e740d5ef46bb1b132 /mathlib.py
parentb0cca9f16f0a57ea07c8a27f4421311e96b41680 (diff)
Bugfixes, plot axes labels, MANIFEST update
Diffstat (limited to 'mathlib.py')
-rw-r--r--mathlib.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/mathlib.py b/mathlib.py
index e1a7eed..8cf1cca 100644
--- a/mathlib.py
+++ b/mathlib.py
@@ -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