if self.op:
    return '({0}{1}{2})'.format(self.left, self.op, self.right)
else:
    return '{0}'.format(self.value)
Generate equation with the result value closest to the requested one, have speed problems