Math: Convert the output of factorial() to a float.

This commit is contained in:
Valentin Lorentz 2018-05-10 06:20:55 +02:00
parent 0d627c05b7
commit 2d084f4deb

View File

@ -109,7 +109,7 @@ class Math(callbacks.Plugin):
return math.pow(x, 1.0/3)
def _factorial(x):
if x<=10000:
return math.factorial(x)
return float(math.factorial(x))
else:
raise Exception('factorial argument too large')
_mathEnv['sqrt'] = _sqrt