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

Constructor Index

 o Elementary()

Method Index

 o ChebyshevSeriesEval(double, double[])
Evaluates a given Chebyshev series at a given point.
 o sign(double, double)
sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of the second argument.
 o sign(float, float)
sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of the second argument.
 o sign(int, int)
sign(a,b) returns |a|*(b/|b|), i.e., the first argument with the sign of the second argument.

Constructors

 o Elementary
 public Elementary()

Methods

 o 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.

 o 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.

 o 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.

 o 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