Fix `IMSQRT()` tests on PHP 7.1
This commit is contained in:
parent
03f96ab6d8
commit
0de994c998
|
@ -1985,6 +1985,10 @@ class Engineering
|
|||
$parsedComplex = self::parseComplex($complexNumber);
|
||||
|
||||
$theta = self::IMARGUMENT($complexNumber);
|
||||
if ($theta === functions::DIV0()) {
|
||||
return '0';
|
||||
}
|
||||
|
||||
$d1 = cos($theta / 2);
|
||||
$d2 = sin($theta / 2);
|
||||
$r = sqrt(sqrt(($parsedComplex['real'] * $parsedComplex['real']) + ($parsedComplex['imaginary'] * $parsedComplex['imaginary'])));
|
||||
|
|
Loading…
Reference in New Issue