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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

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))) {

View File

@ -41,6 +41,11 @@ return [
31415.92654,
1,
],
[
0,
0,
5,
],
[
'#NUM!',
5,