From: Stefan Behnel Date: Sun, 14 Dec 2008 13:26:48 +0000 (+0100) Subject: also pre-calculate the constant result of floats X-Git-Tag: 0.11-beta~130 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7b928a22f61c3b500a7f92157733bfa09a11cc6;p=cython.git also pre-calculate the constant result of floats --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 85506f50..fd7a3f72 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -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)