also pre-calculate the constant result of floats
authorStefan Behnel <scoder@users.berlios.de>
Sun, 14 Dec 2008 13:26:48 +0000 (14:26 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 14 Dec 2008 13:26:48 +0000 (14:26 +0100)
Cython/Compiler/ExprNodes.py

index 85506f50f0d77a839a2653f94f87da2321c51130..fd7a3f727fa2ff90281f1835115edf63b1092d19 100644 (file)
@@ -870,6 +870,9 @@ class IntNode(ConstNode):
 class FloatNode(ConstNode):
     type = PyrexTypes.c_double_type
 
+    def calculate_constant_result(self):
+        self.constant_result = float(self.value)
+
     def compile_time_value(self, denv):
         return float(self.value)