cds.astro
Class AstroMath

java.lang.Object
  extended by cds.astro.AstroMath

public class AstroMath
extends java.lang.Object

Trigonometric and a few other functions used in the astronomical context. This class includes also 3x3 matrix manipulation. Extracted from Class Coo

Version:
1.0: 20-Apr-2004
Author:
Francois Ochsenbein

Field Summary
static double ARCSEC
           
static double DEG
           
static double[] powers
           
 
Constructor Summary
AstroMath()
           
 
Method Summary
static double asinc(double x)
          Function asinc(x), inverse function of sinc
static double asind(double x)
          sin-1 (inverse function of sine), gives argument in degrees
static double atan2d(double y, double x)
          get the polar angle from 2-D cartesian coordinates
static double atand(double x)
          tan-1 (inverse function of tangent), gives argument in degrees
static double atanh(double x)
          tanh-1 (inverse function of tanh)
static double cosd(double x)
          Cosine when argument in degrees
static double cosh(double x)
          Hyperbolic cosine cosh = (exp(x) + exp(-x))/2
static double dexp(double x)
          Compute just 10x
static double dexp(int n)
          Compute just 10n
static double log(double x)
          Compute the log base 10
static double[][] m3p(double[][] A, double[][] B)
          3-Matrices Products
static double[][] m3t(double[][] A)
          Transposed of a Matrix
static double sinc(double x)
          Function sinc(x) = sin(x)/x
static double sind(double x)
          Sine when argument in degrees
static double tanh(double x)
          Hyperbolic tangent = (exp(x)-exp(-x))/(exp(x)+exp(-x))
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

powers

public static final double[] powers

DEG

public static final double DEG
See Also:
Constant Field Values

ARCSEC

public static final double ARCSEC
See Also:
Constant Field Values
Constructor Detail

AstroMath

public AstroMath()
Method Detail

cosd

public static final double cosd(double x)
Cosine when argument in degrees

Parameters:
x - angle in degrees
Returns:
the cosine

sind

public static final double sind(double x)
Sine when argument in degrees

Parameters:
x - angle in degrees
Returns:
the sine

asind

public static final double asind(double x)
sin-1 (inverse function of sine), gives argument in degrees

Parameters:
x - argument
Returns:
y value such that sin(y) = x

atand

public static final double atand(double x)
tan-1 (inverse function of tangent), gives argument in degrees

Parameters:
x - argument
Returns:
angle in degrees

atan2d

public static final double atan2d(double y,
                                  double x)
get the polar angle from 2-D cartesian coordinates

Parameters:
y - cartesian y coordinate
x - cartesian x coordinate
Returns:
polar angle in degrees

cosh

public static final double cosh(double x)
Hyperbolic cosine cosh = (exp(x) + exp(-x))/2

Parameters:
x - argument
Returns:
corresponding hyperbolic cosine (>= 1)

tanh

public static final double tanh(double x)
Hyperbolic tangent = (exp(x)-exp(-x))/(exp(x)+exp(-x))

Parameters:
x - argument
Returns:
corresponding hyperbolic tangent (in range ]-1, 1[)

atanh

public static final double atanh(double x)
tanh-1 (inverse function of tanh)

Parameters:
x - argument, in range ]-1, 1[ (NaN returned otherwise)
Returns:
corresponding hyperbolic inverse tangent

sinc

public static final double sinc(double x)
Function sinc(x) = sin(x)/x

Parameters:
x - argument (radians)
Returns:
corresponding value

asinc

public static final double asinc(double x)
Function asinc(x), inverse function of sinc

Parameters:
x - argument
Returns:
y such that sinc(y) = x

dexp

public static final double dexp(int n)
Compute just 10n

Parameters:
n - Power to which to compute the value
Returns:
10n

dexp

public static final double dexp(double x)
Compute just 10x

Parameters:
x - Power to which to compute the value
Returns:
10x

log

public static final double log(double x)
Compute the log base 10

Parameters:
x - Number (positive)
Returns:
log10(x)

m3p

public static final double[][] m3p(double[][] A,
                                   double[][] B)
3-Matrices Products

Parameters:
A - 3x3 matrix
B - 3x3 matrix
Returns:
R = A * B

m3t

public static final double[][] m3t(double[][] A)
Transposed of a Matrix

Parameters:
A - input matric
Returns:
R = t(A)


Copyright © 2009 UDS/CNRS