| @@ 150-162 (lines=13) @@ | ||
| 147 | case 'sqrt': |
|
| 148 | $result = (self::$blnBcmath) ? bcsqrt($number1, $precision) /* string */ : sqrt($number1); |
|
| 149 | break; |
|
| 150 | case '/': |
|
| 151 | if ($number2 > 0) { |
|
| 152 | if (self::$blnBcmath) { |
|
| 153 | $result = bcdiv($number1, $number2, $precision); // string, or NULL if right_operand is 0 |
|
| 154 | } else if ($number2 != 0) { |
|
| 155 | $result = $number1 / $number2; |
|
| 156 | } |
|
| 157 | } |
|
| 158 | ||
| 159 | if (!isset($result)) { |
|
| 160 | $result = 0; |
|
| 161 | } |
|
| 162 | break; |
|
| 163 | case '%': |
|
| 164 | if (self::$blnBcmath) { |
|
| 165 | $result = bcmod($number1, $number2); // string, or NULL if modulus is 0. |
|
| @@ 163-173 (lines=11) @@ | ||
| 160 | $result = 0; |
|
| 161 | } |
|
| 162 | break; |
|
| 163 | case '%': |
|
| 164 | if (self::$blnBcmath) { |
|
| 165 | $result = bcmod($number1, $number2); // string, or NULL if modulus is 0. |
|
| 166 | } else if ($number2 != 0) { |
|
| 167 | $result = $number1 % $number2; |
|
| 168 | } |
|
| 169 | ||
| 170 | if (!isset($result)) { |
|
| 171 | $result = 0; |
|
| 172 | } |
|
| 173 | break; |
|
| 174 | case '=': |
|
| 175 | $compare = true; |
|
| 176 | if (self::$blnBcmath) { |
|