From c7b928a22f61c3b500a7f92157733bfa09a11cc6 Mon Sep 17 00:00:00 2001 From: Stefan Behnel <scoder@users.berlios.de> Date: Sun, 14 Dec 2008 14:26:48 +0100 Subject: [PATCH] also pre-calculate the constant result of floats --- Cython/Compiler/ExprNodes.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- 2.26.2