Commit c7b928a2 authored by Stefan Behnel's avatar Stefan Behnel

also pre-calculate the constant result of floats

parent b317d831
...@@ -870,6 +870,9 @@ class IntNode(ConstNode): ...@@ -870,6 +870,9 @@ class IntNode(ConstNode):
class FloatNode(ConstNode): class FloatNode(ConstNode):
type = PyrexTypes.c_double_type type = PyrexTypes.c_double_type
def calculate_constant_result(self):
self.constant_result = float(self.value)
def compile_time_value(self, denv): def compile_time_value(self, denv):
return float(self.value) return float(self.value)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment