diff --git a/bi/core.js b/bi/core.js index 746f642b87..5d1a908d6b 100644 --- a/bi/core.js +++ b/bi/core.js @@ -6857,7 +6857,7 @@ function accDiv(arg1, arg2) { with (Math) { r1 = Number(arg1.toString().replace(".", "")); r2 = Number(arg2.toString().replace(".", "")); - return (r1 / r2) * pow(10, t2 - t1); + return (t2 > t1) ? (r1 / r2) * pow(10, t2 - t1) : (r1 / r2) / pow(10, t1 - t2); } } diff --git a/docs/core.js b/docs/core.js index 8d2d7eb6c2..424fced73b 100644 --- a/docs/core.js +++ b/docs/core.js @@ -24390,7 +24390,7 @@ function accDiv(arg1, arg2) { with (Math) { r1 = Number(arg1.toString().replace(".", "")); r2 = Number(arg2.toString().replace(".", "")); - return (r1 / r2) * pow(10, t2 - t1); + return (t2 > t1) ? (r1 / r2) * pow(10, t2 - t1) : (r1 / r2) / pow(10, t1 - t2); } } diff --git a/src/core/proto/number.js b/src/core/proto/number.js index 4a002b71b9..45f5656e64 100644 --- a/src/core/proto/number.js +++ b/src/core/proto/number.js @@ -259,7 +259,7 @@ function accDiv(arg1, arg2) { with (Math) { r1 = Number(arg1.toString().replace(".", "")); r2 = Number(arg2.toString().replace(".", "")); - return (r1 / r2) * pow(10, t2 - t1); + return (t2 > t1) ? (r1 / r2) * pow(10, t2 - t1) : (r1 / r2) / pow(10, t1 - t2); } }