ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
asin.php
Go to the documentation of this file.
1 <?php
2 
10 namespace Complex;
11 
19 if (!function_exists(__NAMESPACE__ . '\\asin')) {
20  function asin($complex): Complex
21  {
22  $complex = Complex::validateComplexArgument($complex);
23 
24  $square = multiply($complex, $complex);
25  $invsqrt = new Complex(1.0);
26  $invsqrt = subtract($invsqrt, $square);
27  $invsqrt = sqrt($invsqrt);
28  $adjust = new Complex(
29  $invsqrt->getReal() - $complex->getImaginary(),
30  $invsqrt->getImaginary() + $complex->getReal()
31  );
32  $log = ln($adjust);
33 
34  return new Complex(
35  $log->getImaginary(),
36  -1 * $log->getReal()
37  );
38  }
39 }
$log
Definition: sabredav.php:21