()
| 650 | //------------------------------------------------------------------------ |
| 651 | // Hyperbolic trigonometric functions |
| 652 | public Complex sinh() { |
| 653 | double scalar; |
| 654 | double temp1Re, temp1Im; |
| 655 | double temp2Re, temp2Im; |
| 656 | // sinh(z) = ( exp(z) - exp(-z) ) / 2 |
| 657 | // first exp |
| 658 | scalar = Math.exp(re); |
| 659 | temp1Re = scalar*Math.cos(im); |
| 660 | temp1Im = scalar*Math.sin(im); |
| 661 | // second exp |
| 662 | scalar = Math.exp(-re); |
| 663 | temp2Re = scalar*Math.cos(-im); |
| 664 | temp2Im = scalar*Math.sin(-im); |
| 665 | temp1Re -= temp2Re; |
| 666 | temp1Im -= temp2Im; |
| 667 | return new Complex(0.5*temp1Re, 0.5*temp1Im); |
| 668 | } |
| 669 | |
| 670 | public Complex cosh() { |
| 671 | double scalar; |
no test coverage detected