19if (!function_exists(__NAMESPACE__ .
'\\exp')) {
20 function exp($complex): Complex
22 $complex = Complex::validateComplexArgument($complex);
24 if (($complex->getReal() == 0.0) && (\abs($complex->getImaginary()) == M_PI)) {
25 return new Complex(-1.0, 0.0);
28 $rho = \exp($complex->getReal());
31 $rho * \cos($complex->getImaginary()),
32 $rho * \sin($complex->getImaginary()),
An exception for terminatinating execution or to throw for unit testing.