()
| 634 | } |
| 635 | |
| 636 | public Complex atan() { |
| 637 | // atan(z) = -i/2 * log((i-z)/(i+z)) |
| 638 | double tempRe, tempIm; |
| 639 | Complex result = new Complex(-re, 1.0-im); |
| 640 | tempRe = re; |
| 641 | tempIm = 1.0+im; |
| 642 | result = result.div(new Complex(tempRe, tempIm)); |
| 643 | tempRe = Math.log(result.abs()); |
| 644 | tempIm = result.arg(); |
| 645 | result.re = 0.5*tempIm; |
| 646 | result.im = -0.5*tempRe; |
| 647 | return result; |
| 648 | } |
| 649 | |
| 650 | //------------------------------------------------------------------------ |
| 651 | // Hyperbolic trigonometric functions |
no test coverage detected