edu.ucsc.soe.raff.ExponentialNotation
Class ExponentialNotationMath

java.lang.Object
  |
  +--edu.ucsc.soe.raff.ExponentialNotation.ExponentialNotationMath

public class ExponentialNotationMath
extends java.lang.Object

A class for performing some mathematical operations for which it potentially makes sense to use ExponentialNotationNumbers.


Field Summary
static double COMMON_LOG_E
          Log to base 10 of Euler's number e = 2.718....
static double NATURAL_LOG_10
          Log of 10 to base Euler's number e = 2.718....
 
Constructor Summary
ExponentialNotationMath()
           
 
Method Summary
static double acot(ExponentialNotationNumber a)
          Returns the inverse cotangent of an ExponentialNotationNumber.
static double acsc(ExponentialNotationNumber a)
          Returns the inverse cosecant of an ExponentialNotationNumber.
static ExponentialNotationNumber approxBinomCoeff(long n, long k)
          Returns an ExponentialNotationNumber approximately equal to C(n, k), the kth binomial coefficient of n, using approximate factorials computed by Stirling's formula.
static ExponentialNotationNumber approxFactorial(long n)
          Returns an ExponentialNotationNumber approximating by Stirling's formula the factorial of the given long.
static ExponentialNotationNumber approxNumPartitions(long n)
          Returns an ExponentialNotationNumber approximately equal to the number of unlabeled partitions of the long integer argument.
static double asec(ExponentialNotationNumber a)
          Returns the inverse secant of an ExponentialNotationNumber.
static double atan(ExponentialNotationNumber a)
          Returns the inverse tangent of an ExponentialNotationNumber.
static ExponentialNotationNumber binomCoeff(long n, long k)
          Returns an ExponentialNotationNumber expressing C(n, k), the kth binomial coefficient of n.
static double commonLog(double d)
          Log to base 10 of the given argument.
static ExponentialNotationNumber cot(double a)
          Returns an ExponentialNotationNumber expressing the trignometric cotangent function of a double representing an angle in radians.
static ExponentialNotationNumber csc(double a)
          Returns an ExponentialNotationNumber expressing the trignometric cosecant function of a double representing an angle in radians.
static ExponentialNotationNumber exp(double d)
          Returns an ExponentialNotationNumber of value of Euler's number (e = 2.718...) raised to the power of a double value.
static ExponentialNotationNumber factorial(long n)
          Returns an ExponentialNotationNumber representing the factorial of the given long.
static ExponentialNotationNumber log(double d)
          Returns an ExponentialNotationNumber expressing the value of the natural log (to base e = 2.718...) of a double value.
static ExponentialNotationNumber max(ExponentialNotationNumber a, ExponentialNotationNumber b)
          Returns the greater of two ExponentialNotationNumber values.
static ExponentialNotationNumber min(ExponentialNotationNumber a, ExponentialNotationNumber b)
          Returns the smaller of two ExponentialNotationNumber values.
static ExponentialNotationNumber pow(double a, double b)
          Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.
static ExponentialNotationNumber pow(double a, long b)
          Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.
static ExponentialNotationNumber pow(ExponentialNotationNumber a, double b)
          Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.
static ExponentialNotationNumber pow(ExponentialNotationNumber a, long b)
          Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.
static ExponentialNotationNumber sec(double a)
          Returns an ExponentialNotationNumber expressing the trignometric secant function of a double representing an angle in radians.
static int signum(ExponentialNotationNumber val)
          Returns the signum function of the given ExponentialNotationNumber.
static ExponentialNotationNumber sqrt(ExponentialNotationNumber a)
          Returns an ExponentialNotationNumber expressing the square root of an ExponentialNotationNumber.
static ExponentialNotationNumber tan(double a)
          Returns an ExponentialNotationNumber expressing the trignometric tangent function of a double representing an angle in radians.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NATURAL_LOG_10

public static final double NATURAL_LOG_10
Log of 10 to base Euler's number e = 2.718.... Useful for converting between common and natural logarithms.

COMMON_LOG_E

public static final double COMMON_LOG_E
Log to base 10 of Euler's number e = 2.718.... Useful for converting between common and natural logarithms.
Constructor Detail

ExponentialNotationMath

public ExponentialNotationMath()
Method Detail

signum

public static int signum(ExponentialNotationNumber val)
Returns the signum function of the given ExponentialNotationNumber.

max

public static ExponentialNotationNumber max(ExponentialNotationNumber a,
                                            ExponentialNotationNumber b)
Returns the greater of two ExponentialNotationNumber values.

min

public static ExponentialNotationNumber min(ExponentialNotationNumber a,
                                            ExponentialNotationNumber b)
Returns the smaller of two ExponentialNotationNumber values.

commonLog

public static double commonLog(double d)
Log to base 10 of the given argument.

exp

public static ExponentialNotationNumber exp(double d)
Returns an ExponentialNotationNumber of value of Euler's number (e = 2.718...) raised to the power of a double value.

log

public static ExponentialNotationNumber log(double d)
Returns an ExponentialNotationNumber expressing the value of the natural log (to base e = 2.718...) of a double value.

pow

public static ExponentialNotationNumber pow(double a,
                                            long b)
Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.

pow

public static ExponentialNotationNumber pow(double a,
                                            double b)
Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.

pow

public static ExponentialNotationNumber pow(ExponentialNotationNumber a,
                                            long b)
Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.

pow

public static ExponentialNotationNumber pow(ExponentialNotationNumber a,
                                            double b)
Returns an ExponentialNotationNumber expressing the value of the first argument raised to the power of the second argument.

sqrt

public static ExponentialNotationNumber sqrt(ExponentialNotationNumber a)
Returns an ExponentialNotationNumber expressing the square root of an ExponentialNotationNumber.

tan

public static ExponentialNotationNumber tan(double a)
Returns an ExponentialNotationNumber expressing the trignometric tangent function of a double representing an angle in radians.

cot

public static ExponentialNotationNumber cot(double a)
Returns an ExponentialNotationNumber expressing the trignometric cotangent function of a double representing an angle in radians.

sec

public static ExponentialNotationNumber sec(double a)
Returns an ExponentialNotationNumber expressing the trignometric secant function of a double representing an angle in radians.

csc

public static ExponentialNotationNumber csc(double a)
Returns an ExponentialNotationNumber expressing the trignometric cosecant function of a double representing an angle in radians.

atan

public static double atan(ExponentialNotationNumber a)
Returns the inverse tangent of an ExponentialNotationNumber.

acot

public static double acot(ExponentialNotationNumber a)
Returns the inverse cotangent of an ExponentialNotationNumber.

asec

public static double asec(ExponentialNotationNumber a)
Returns the inverse secant of an ExponentialNotationNumber.

acsc

public static double acsc(ExponentialNotationNumber a)
Returns the inverse cosecant of an ExponentialNotationNumber.

factorial

public static ExponentialNotationNumber factorial(long n)
Returns an ExponentialNotationNumber representing the factorial of the given long.

approxFactorial

public static ExponentialNotationNumber approxFactorial(long n)
Returns an ExponentialNotationNumber approximating by Stirling's formula the factorial of the given long.

binomCoeff

public static ExponentialNotationNumber binomCoeff(long n,
                                                   long k)
Returns an ExponentialNotationNumber expressing C(n, k), the kth binomial coefficient of n.

approxBinomCoeff

public static ExponentialNotationNumber approxBinomCoeff(long n,
                                                         long k)
Returns an ExponentialNotationNumber approximately equal to C(n, k), the kth binomial coefficient of n, using approximate factorials computed by Stirling's formula.

approxNumPartitions

public static ExponentialNotationNumber approxNumPartitions(long n)
Returns an ExponentialNotationNumber approximately equal to the number of unlabeled partitions of the long integer argument.