All Packages Class Hierarchy This Package Previous Next Index
Class jnt.functions.Elementary
java.lang.Object
|
+----jnt.functions.Elementary
- public class Elementary
- extends Object
Elementary mathematical functions. This class is a container for a group
of static functions; the class need not be instantiated to use its methods.
- Version:
- 12 November 1997
- Author:
- Ronald F. Boisvert, NIST
-
Elementary()
-
-
ChebyshevSeriesEval(double, double[])
- Evaluates a given Chebyshev series at a given point.
-
sign(double, double)
- sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of
the second argument.
-
sign(float, float)
- sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of
the second argument.
-
sign(int, int)
- sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of
the second argument.
Elementary
public Elementary()
sign
public static double sign(double a,
double b)
- sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of
the second argument. If b==0, then |a| is returned.
sign
public static float sign(float a,
float b)
- sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of
the second argument. If b==0, then |a| is returned.
sign
public static int sign(int a,
int b)
- sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of
the second argument. If b==0, then |a| is returned.
ChebyshevSeriesEval
public static double ChebyshevSeriesEval(double x,
double a[])
- Evaluates a given Chebyshev series at a given point.
The series is represented by an array a. If a has length n then this
function returns
a0 T0(x) + a1 T1(x) + ... +
an-1 Tn-1(x)
where Tk is the kth Chebyshev polynomial.
This code was adapted from R. Broucke, Algorithm 446, C.A.C.M., 16, 254 (1973).
Also see Fox and Parker, Chebyshev Polynomials in Numerical Analysis, Oxford
University Press, page 56.
- Parameters:
- x - (double)
The point at which the series is to be evaluated.
- a - (double[])
Array containing the coefficients of the Chebyshev series.
All Packages Class Hierarchy This Package Previous Next Index