Commit f793ca17 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix for #260, float floor div

parent 42bd9268
......@@ -4265,7 +4265,11 @@ class DivNode(NumBinopNode):
code.putln("}")
def calculate_result_code(self):
if self.cdivision:
if self.type.is_float and self.operator == '//':
return "floor(%s / %s)" % (
self.operand1.result(),
self.operand2.result())
elif self.cdivision:
return "(%s / %s)" % (
self.operand1.result(),
self.operand2.result())
......
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