gishur.core
Class ExtMath

java.lang.Object
  |
  +--gishur.core.ExtMath

public abstract class ExtMath
extends java.lang.Object

A class supplying mathematical functionary which is not included in java.lang.Math.

Version:
1.0
Author:
Thomas Wolf

Constructor Summary
ExtMath()
           
 
Method Summary
static double acosh(double x)
          Returns the inverse hyperbolic cosinus of angle x.
static double asinh(double x)
          Returns the inverse hyperbolic sinus of angle x.
static double atanh(double x)
          Returns the inverse hyperbolic tangens of angle x.
static double cosh(double x)
          Returns the hyperbolic cosinus of angle x.
static double[][] findRoots(double A, double B, double C)
          Computes the solutions of the quadratic A*x^2+B*x+C=0 and returns them in an array of double-values.
static double[][] findRoots(double A, double B, double C, double D)
          Computes the solutions of the cubic equation A*x^3+B*x^2+C*x+D=0 and returns them in an array of double-values.
static double[][] findRoots(double A, double B, double C, double D, double E)
          Computes the roots of the fourth degree equation A*x^4+B*x^3+C*x^2+D*x+E=0 and returns them in an array of double-values.
static double sinh(double x)
          Returns the hyperbolic sinus of angle x.
static double tanh(double x)
          Returns the hyperbolic tangens of angle x.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtMath

public ExtMath()
Method Detail

sinh

public static double sinh(double x)
Returns the hyperbolic sinus of angle x.
Returns:
sinus hyperbolicus of x

cosh

public static double cosh(double x)
Returns the hyperbolic cosinus of angle x.
Returns:
cosinus hyperbolicus of x

tanh

public static double tanh(double x)
Returns the hyperbolic tangens of angle x.
Returns:
tangens hyperbolicus of x

asinh

public static double asinh(double x)
Returns the inverse hyperbolic sinus of angle x.
Returns:
areasinus hyperbolicus of x

acosh

public static double acosh(double x)
Returns the inverse hyperbolic cosinus of angle x.
Returns:
areacosinus hyperbolicus of x

atanh

public static double atanh(double x)
Returns the inverse hyperbolic tangens of angle x.
Returns:
areatangens hyperbolicus of x

findRoots

public static double[][] findRoots(double A,
                                   double B,
                                   double C)
Computes the solutions of the quadratic A*x^2+B*x+C=0 and returns them in an array of double-values. A quadratic either has two complex or two real roots. The real roots may be equal. The complex roots are returned as z[0][0]+i*z[0][1] and z[1][0]+i*z[1][1].
Parameters:
A,B,C - the coefficients of the quadratic equation
Returns:
all solutions with their real components in z[.][0] and their imaginary components in z[.][1]

findRoots

public static double[][] findRoots(double A,
                                   double B,
                                   double C,
                                   double D)
Computes the solutions of the cubic equation A*x^3+B*x^2+C*x+D=0 and returns them in an array of double-values. A cubic equation either has three (possibly equal) real solutions or a real and two complex solutions. The returned solutions are stored in the array as {z[0][0]+i*z[0][1],z[1][0]+i*z[1][1] and z[2][0]+i*z[2][1]}.
Parameters:
A,B,C,D - the coefficients of the cubic equation
Returns:
all solutions with their real components in z[.][0] and their imaginary components in z[.][1]

findRoots

public static double[][] findRoots(double A,
                                   double B,
                                   double C,
                                   double D,
                                   double E)
Computes the roots of the fourth degree equation A*x^4+B*x^3+C*x^2+D*x+E=0 and returns them in an array of double-values. The returned solutions are stored in the array as {z[0][0]+i*z[0][1],z[1][0]+i*z[1][1], z[2][0]+i*z[2][1] and z[3][0]+i*z[3][1]}.
Parameters:
A,B,C,D,E - the coefficients of the equation
Returns:
all solutions with their real components in z[.][0] and their imaginary components in z[.][1]