org.apache.commons.nabla
Class NablaStrictMath

java.lang.Object
  extended by org.apache.commons.nabla.NablaStrictMath

public class NablaStrictMath
extends Object

StrictMath-like utility class computing differentials.

This class provides mathematical functions similar to the functions provided by the standard java.lang.StrictMath class but using DifferentialPair instances instead of doubles.


Method Summary
static DifferentialPair abs(DifferentialPair a)
          Absolute value function.
static DifferentialPair acos(DifferentialPair a)
          Inverse cosine function.
static DifferentialPair acosh(DifferentialPair a)
          Inverse hyperbolic cosine function.
static DifferentialPair asin(DifferentialPair a)
          Inverse sine function.
static DifferentialPair asinh(DifferentialPair a)
          Inverse hyperbolic sine function.
static DifferentialPair atan(DifferentialPair a)
          Inverse tangent function.
static DifferentialPair atan2(DifferentialPair y, DifferentialPair x)
          Cartesian to polar conversion function.
static DifferentialPair atan2(DifferentialPair y, double x)
          Cartesian to polar conversion function.
static DifferentialPair atan2(double y, DifferentialPair x)
          Cartesian to polar conversion function.
static DifferentialPair atanh(DifferentialPair a)
          Inverse hyperbolic tangent function.
static DifferentialPair cbrt(DifferentialPair a)
          Cubic root function.
static DifferentialPair ceil(DifferentialPair a)
          Ceil function.
static DifferentialPair copySign(DifferentialPair magnitude, DifferentialPair sign)
          Sign copy function.
static DifferentialPair copySign(DifferentialPair magnitude, double sign)
          Sign copy function.
static DifferentialPair copySign(double magnitude, DifferentialPair sign)
          Sign copy function.
static DifferentialPair cos(DifferentialPair a)
          Cosine function.
static DifferentialPair cosh(DifferentialPair a)
          Hyperbolic cosine function.
static DifferentialPair exp(DifferentialPair a)
          Exponential function.
static DifferentialPair expm1(DifferentialPair a)
          Exponential minus 1 function.
static DifferentialPair floor(DifferentialPair a)
          Floor function.
static DifferentialPair hypot(DifferentialPair x, DifferentialPair y)
          Cartesian to polar conversion function.
static DifferentialPair hypot(DifferentialPair x, double y)
          Cartesian to polar conversion function.
static DifferentialPair hypot(double x, DifferentialPair y)
          Cartesian to polar conversion function.
static DifferentialPair IEEEremainder(DifferentialPair f1, DifferentialPair f2)
          Remainder function.
static DifferentialPair IEEEremainder(DifferentialPair f1, double f2)
          Remainder function.
static DifferentialPair IEEEremainder(double f1, DifferentialPair f2)
          Remainder function.
static DifferentialPair log(DifferentialPair a)
          Natural logarithm function.
static DifferentialPair log10(DifferentialPair a)
          Base 10 logarithm function.
static DifferentialPair log1p(DifferentialPair a)
          Shifted natural logarithm function.
static DifferentialPair max(DifferentialPair a, DifferentialPair b)
          Max function.
static DifferentialPair max(DifferentialPair a, double b)
          Max function.
static DifferentialPair max(double a, DifferentialPair b)
          Max function.
static DifferentialPair min(DifferentialPair a, DifferentialPair b)
          Min function.
static DifferentialPair min(DifferentialPair a, double b)
          Min function.
static DifferentialPair min(double a, DifferentialPair b)
          Min function.
static DifferentialPair nextAfter(DifferentialPair start, DifferentialPair direction)
          Neighbor function.
static DifferentialPair nextAfter(DifferentialPair start, double direction)
          Neighbor function.
static DifferentialPair nextAfter(double start, DifferentialPair direction)
          Neighbor function.
static DifferentialPair nextUp(DifferentialPair a)
          Neighbor function.
static DifferentialPair pow(DifferentialPair a, DifferentialPair b)
          Power function.
static DifferentialPair pow(DifferentialPair a, double b)
          Power function.
static DifferentialPair pow(double a, DifferentialPair b)
          Power function.
static DifferentialPair rint(DifferentialPair a)
          Rounding function.
static DifferentialPair scalb(DifferentialPair a, int scale)
          Binary rescaling function.
static DifferentialPair signum(DifferentialPair a)
          Sign function.
static DifferentialPair sin(DifferentialPair a)
          Sine function.
static DifferentialPair sinh(DifferentialPair a)
          Hyperbolic sine function.
static DifferentialPair sqrt(DifferentialPair a)
          Square root function.
static DifferentialPair tan(DifferentialPair a)
          Tangent function.
static DifferentialPair tanh(DifferentialPair a)
          Hyperbolic tangent function.
static DifferentialPair toDegrees(DifferentialPair a)
          Angular conversion function.
static DifferentialPair toRadians(DifferentialPair a)
          Angular conversion function.
static DifferentialPair ulp(DifferentialPair a)
          Unit in Last Position function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

exp

public static DifferentialPair exp(DifferentialPair a)
Exponential function.

Parameters:
a - function input value
Returns:
ea

expm1

public static DifferentialPair expm1(DifferentialPair a)
Exponential minus 1 function.

Parameters:
a - function input value
Returns:
ea-1

log

public static DifferentialPair log(DifferentialPair a)
Natural logarithm function.

Parameters:
a - function input value
Returns:
log(a)

log1p

public static DifferentialPair log1p(DifferentialPair a)
Shifted natural logarithm function.

Parameters:
a - function input value
Returns:
log(1+a)

log10

public static DifferentialPair log10(DifferentialPair a)
Base 10 logarithm function.

Parameters:
a - function input value
Returns:
log10(a)

cos

public static DifferentialPair cos(DifferentialPair a)
Cosine function.

Parameters:
a - function input value
Returns:
cos(a)

sin

public static DifferentialPair sin(DifferentialPair a)
Sine function.

Parameters:
a - function input value
Returns:
sin(a)

tan

public static DifferentialPair tan(DifferentialPair a)
Tangent function.

Parameters:
a - function input value
Returns:
tan(a)

acos

public static DifferentialPair acos(DifferentialPair a)
Inverse cosine function.

Parameters:
a - function input value
Returns:
acos(a)

asin

public static DifferentialPair asin(DifferentialPair a)
Inverse sine function.

Parameters:
a - function input value
Returns:
asin(a)

atan

public static DifferentialPair atan(DifferentialPair a)
Inverse tangent function.

Parameters:
a - function input value
Returns:
atan(a)

atan2

public static DifferentialPair atan2(DifferentialPair y,
                                     double x)
Cartesian to polar conversion function.

Parameters:
y - cartesian ordinate of the point
x - cartesian abscissa of the point
Returns:
angular part of the polar coordinates of the point

atan2

public static DifferentialPair atan2(double y,
                                     DifferentialPair x)
Cartesian to polar conversion function.

Parameters:
y - cartesian ordinate of the point
x - cartesian abscissa of the point
Returns:
angular part of the polar coordinates of the point

atan2

public static DifferentialPair atan2(DifferentialPair y,
                                     DifferentialPair x)
Cartesian to polar conversion function.

Parameters:
y - cartesian ordinate of the point
x - cartesian abscissa of the point
Returns:
angular part of the polar coordinates of the point

hypot

public static DifferentialPair hypot(DifferentialPair x,
                                     double y)
Cartesian to polar conversion function.

Parameters:
x - cartesian abscissa of the point
y - cartesian ordinate of the point
Returns:
radius part of the polar coordinates of the point

hypot

public static DifferentialPair hypot(double x,
                                     DifferentialPair y)
Cartesian to polar conversion function.

Parameters:
x - cartesian abscissa of the point
y - cartesian ordinate of the point
Returns:
radius part of the polar coordinates of the point

hypot

public static DifferentialPair hypot(DifferentialPair x,
                                     DifferentialPair y)
Cartesian to polar conversion function.

Parameters:
x - cartesian abscissa of the point
y - cartesian ordinate of the point
Returns:
radius part of the polar coordinates of the point

cosh

public static DifferentialPair cosh(DifferentialPair a)
Hyperbolic cosine function.

Parameters:
a - function input value
Returns:
cosh(a)

sinh

public static DifferentialPair sinh(DifferentialPair a)
Hyperbolic sine function.

Parameters:
a - function input value
Returns:
sinh(a)

tanh

public static DifferentialPair tanh(DifferentialPair a)
Hyperbolic tangent function.

Parameters:
a - function input value
Returns:
tanh(a)

acosh

public static DifferentialPair acosh(DifferentialPair a)
Inverse hyperbolic cosine function.

Parameters:
a - function input value
Returns:
acosh(a)

asinh

public static DifferentialPair asinh(DifferentialPair a)
Inverse hyperbolic sine function.

Parameters:
a - function input value
Returns:
asinh(a)

atanh

public static DifferentialPair atanh(DifferentialPair a)
Inverse hyperbolic tangent function.

Parameters:
a - function input value
Returns:
atanh(a)

sqrt

public static DifferentialPair sqrt(DifferentialPair a)
Square root function.

Parameters:
a - function input value
Returns:
&sqrt;a

cbrt

public static DifferentialPair cbrt(DifferentialPair a)
Cubic root function.

Parameters:
a - function input value
Returns:
cbrt(a)

pow

public static DifferentialPair pow(DifferentialPair a,
                                   double b)
Power function.

Parameters:
a - base value
b - exponent value
Returns:
ab

pow

public static DifferentialPair pow(double a,
                                   DifferentialPair b)
Power function.

Parameters:
a - base value
b - exponent value
Returns:
ab

pow

public static DifferentialPair pow(DifferentialPair a,
                                   DifferentialPair b)
Power function.

Parameters:
a - base value
b - exponent value
Returns:
ab

abs

public static DifferentialPair abs(DifferentialPair a)
Absolute value function.

Parameters:
a - function input value
Returns:
|a|

signum

public static DifferentialPair signum(DifferentialPair a)
Sign function.

Parameters:
a - function input value
Returns:
-1, 0 or +1 according to the sign of a

copySign

public static DifferentialPair copySign(DifferentialPair magnitude,
                                        double sign)
Sign copy function.

Parameters:
magnitude - function input value
sign - sign reference
Returns:
either magnitude or -magnitude to match sign

copySign

public static DifferentialPair copySign(double magnitude,
                                        DifferentialPair sign)
Sign copy function.

Parameters:
magnitude - function input value
sign - sign reference
Returns:
either magnitude or -magnitude to match sign

copySign

public static DifferentialPair copySign(DifferentialPair magnitude,
                                        DifferentialPair sign)
Sign copy function.

Parameters:
magnitude - function input value
sign - sign reference
Returns:
either magnitude or -magnitude to match sign

floor

public static DifferentialPair floor(DifferentialPair a)
Floor function.

Parameters:
a - function input value
Returns:
largest integer value smaller than a or equal to a

rint

public static DifferentialPair rint(DifferentialPair a)
Rounding function.

Parameters:
a - function input value
Returns:
closest integer value to a

ceil

public static DifferentialPair ceil(DifferentialPair a)
Ceil function.

Parameters:
a - function input value
Returns:
smallest integer value greater than a or equal to a

nextUp

public static DifferentialPair nextUp(DifferentialPair a)
Neighbor function.

Parameters:
a - function input value
Returns:
smallest representable double value ly greater than a

nextAfter

public static DifferentialPair nextAfter(DifferentialPair start,
                                         double direction)
Neighbor function.

Parameters:
start - function input value
direction - direction of neighboring (relative to a)
Returns:
closest double value different than a in given direction

nextAfter

public static DifferentialPair nextAfter(double start,
                                         DifferentialPair direction)
Neighbor function.

Parameters:
start - function input value
direction - direction of neighboring (relative to a)
Returns:
closest double value different than a in given direction

nextAfter

public static DifferentialPair nextAfter(DifferentialPair start,
                                         DifferentialPair direction)
Neighbor function.

Parameters:
start - function input value
direction - direction of neighboring (relative to a)
Returns:
closest double value different than a in given direction

ulp

public static DifferentialPair ulp(DifferentialPair a)
Unit in Last Position function.

Parameters:
a - function input value
Returns:
value of the least significant bit of a

scalb

public static DifferentialPair scalb(DifferentialPair a,
                                     int scale)
Binary rescaling function.

Parameters:
a - function input value
scale - exponent part of the 2scale multiplication factor
Returns:
a × 2scale

IEEEremainder

public static DifferentialPair IEEEremainder(DifferentialPair f1,
                                             double f2)
Remainder function.

Parameters:
f1 - dividend
f2 - divisor
Returns:
remainder of f1/f2, following IEEE754 conventions

IEEEremainder

public static DifferentialPair IEEEremainder(double f1,
                                             DifferentialPair f2)
Remainder function.

Parameters:
f1 - dividend
f2 - divisor
Returns:
remainder of f1/f2, following IEEE754 conventions

IEEEremainder

public static DifferentialPair IEEEremainder(DifferentialPair f1,
                                             DifferentialPair f2)
Remainder function.

Parameters:
f1 - dividend
f2 - divisor
Returns:
remainder of f1/f2, following IEEE754 conventions

toDegrees

public static DifferentialPair toDegrees(DifferentialPair a)
Angular conversion function.

Parameters:
a - angle in radians
Returns:
angle converted to degrees

toRadians

public static DifferentialPair toRadians(DifferentialPair a)
Angular conversion function.

Parameters:
a - angle in degrees
Returns:
angle converted to radians

max

public static DifferentialPair max(DifferentialPair a,
                                   double b)
Max function.

Parameters:
a - first function input value
b - second function input value
Returns:
maximal value from the (a, b) pair

max

public static DifferentialPair max(double a,
                                   DifferentialPair b)
Max function.

Parameters:
a - first function input value
b - second function input value
Returns:
maximal value from the (a, b) pair

max

public static DifferentialPair max(DifferentialPair a,
                                   DifferentialPair b)
Max function.

Parameters:
a - first function input value
b - second function input value
Returns:
maximal value from the (a, b) pair

min

public static DifferentialPair min(DifferentialPair a,
                                   double b)
Min function.

Parameters:
a - first function input value
b - second function input value
Returns:
minimal value from the (a, b) pair

min

public static DifferentialPair min(double a,
                                   DifferentialPair b)
Min function.

Parameters:
a - first function input value
b - second function input value
Returns:
minimal value from the (a, b) pair

min

public static DifferentialPair min(DifferentialPair a,
                                   DifferentialPair b)
Min function.

Parameters:
a - first function input value
b - second function input value
Returns:
minimal value from the (a, b) pair


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.