The Complex
class is used to represent and operate on complex numbers.
The Complex
class is used to represent and operate on complex numbers.
Internally, a complex number is represented as two double precision
floating point numbers (Double). Externally, two forms are supported:
a+bi = 2.1+3.2i via: Complex ("2.1+3.2i"), toString (a, b) = (2.1, 3.2) via: create ("(2.1,=, 3.2)"), toString2
Note: 'i * i = -1'.
the real part (e.g., 2.1)
the imaginary part (e.g., 3.2)
The DoubleWithExp
class defines an expontiation operator '~^' for Doubles.
The DoubleWithExp
class defines an expontiation operator '~^' for Doubles.
the base
The IntWithExp
class defines an expontiation operator '~^' for Ints.
The IntWithExp
class defines an expontiation operator '~^' for Ints.
the base
The LongWithExp
class defines an expontiation operator '~^' for Longs.
To maintain 64 bit precision, no floating point operations are used.
The LongWithExp
class defines an expontiation operator '~^' for Longs.
To maintain 64 bit precision, no floating point operations are used.
the long base
The ProbNumber
class is used to represent probabilistic numbers '(x, p)'
where 'x' is a real number and 'p' is its probability of occurrence.
The ProbNumber
class is used to represent probabilistic numbers '(x, p)'
where 'x' is a real number and 'p' is its probability of occurrence.
FIX: Currently this class is half-baked!!!
the real number (double precision)
the probability of its occurrence [0, 1]
http://okmij.org/ftp/Computation/monads.html#random-var-monad
The Rational
class is used to represent and operate on rational numbers.
The Rational
class is used to represent and operate on rational numbers.
Internally, a rational number is represented as two long integers.
Externally, two forms are supported:
a/b = 2/3 via: Rational ("2/3"), toString (a, b) = (2, 3) via: create ("(2, 3)") toString2
Rational number can be created without loss of precision using the constructor, apply, create or fromBigDecimal methods. Other methods may lose precision.
the numerator (e.g., 2)
the denominator (e.g., 3)
The Basic
object provides additional methods for computing logarithms and a
method for transforming Booleans into Ints.
The BasicTest
object is used to test the Basic
object.
The Combinatorics
object provides several common combinatorics functions,
such as factorial permutations, combinations, gamma and beta functions.
The CombinatoricsTest
object tests the methods in the Combinatorics
object.
The CombinatoricsTest2
object tests the Gamma and factorial methods in the
Combinatorics
object.
The Complex
companion object defines the origin (zero) and the fourth roots
of unity as well as some utility functions.
The ComplexTest
object is used to test the Complex
class.
The DoubleWithExp
companion object provides implicit conversion from Double
to DoubleWithExp allowing '~^' to be applied to Doubles.
It also provide a negative exponential function.
The DoubleWithExpTest
object is used to test the DoubleWithExp
class.
The ExtremeD
object contains constants representing extreme values for
Double (IEEE 754 double precision floating point numbers).
The ExtremeD
object contains constants representing extreme values for
Double (IEEE 754 double precision floating point numbers).
en.wikipedia.org/wiki/Double-precision_floating-point_format
The ExtremeDTest
object is used to test the ExtremeD
class.
The IntWithExp
object provides implicit conversion from Int to IntWithExp
allowing '~^' to be applied to Ints.
The IntWithExpTest
object is used to test the IntWithExp
class.
The LongWithExp
obejct provides implicit conversion from Long to LongWithExp
allowing '~^' to be applied to Longs.
The LongWithExpTest
object is used to test the LongWithExp
class.
The Primes
object provides an array of 1000 prime numbers as well as methods
to generate prime numbers within a given range.
The PrimesTest
object is use to perform timing test on the Primes
object.
The ProbNumberTest
object is used to test the ProbNumber
class.
The Rational
companion object defines the origin (zero), one and minus one
as well as some utility functions.
The RationalTest
object is used to test the Rational
class.
The math package contains classes, traits and objects for common mathematical operations.