Commit 462f8f70 authored by Martin Bauer's avatar Martin Bauer
Browse files

Fixed problem when generation code for minimum(int, int)

-> by default sympy generates "fmin" C-function for sp.Min which
   is wrong for integer parameters
parent b72ef215
......@@ -208,6 +208,10 @@ class CustomSympyPrinter(CCodePrinter):
def __init__(self):
super(CustomSympyPrinter, self).__init__()
self._float_type = create_type("float32")
if 'Min' in self.known_functions:
del self.known_functions['Min']
if 'Max' in self.known_functions:
del self.known_functions['Max']
def _print_Pow(self, expr):
"""Don't use std::pow function, for small integer exponents, write as multiplication"""
Supports Markdown
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