Mrand of zero to any multiple should return 0 (#1773)

This commit is contained in:
Martins Sipenko
2021-01-07 13:06:26 +02:00
committed by GitHub
parent d2edab2827
commit ec51b75fee
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -851,7 +851,7 @@ class MathTrig
$multiple = Functions::flattenSingleValue($multiple);
if ((is_numeric($number)) && (is_numeric($multiple))) {
if ($multiple == 0) {
if ($number == 0 || $multiple == 0) {
return 0;
}
if ((self::SIGN($number)) == (self::SIGN($multiple))) {
@@ -41,6 +41,11 @@ return [
31415.92654,
1,
],
[
0,
0,
5,
],
[
'#NUM!',
5,