From 2d084f4deb841e12c6ba414bef72f6db0dfa1e60 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Thu, 10 May 2018 06:20:55 +0200 Subject: [PATCH] Math: Convert the output of factorial() to a float. --- plugins/Math/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index 2c441ac5b..29bbf0bb1 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -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