# calc library Null safety

Mathematical and statistical functions and classes.

## Classes

Beta distribution.
BinomialDistribution
Binomial distribution.
ContinuousDistribution
Abstract superclass for continuous distributions such as NormalDistribution.
Abstract superclass for discrete distributions.
Distribution<T>
Abstract superclass for probability distributions. [...]
Float32Matrix
Floating-point matrix that stores elements in Float32List. [...]
Float32Tensor
Float32TensorBuilder
Float32Vector
Float64TensorBuilder
FloatTensorBuilder
Frequencies<T>
Frequencies of discrete items. [...]
LinearTensorModel
Linear regression model for scalar variables. [...]
Matrix<T>
A matrix. [...]
MutableRectangle<T extends num>
A class for representing two-dimensional axis-aligned rectangles with mutable properties.
NormalDistribution
Normal distribution (also known as Gaussian distribution). [...]
Point<T extends num>
A utility class for representing two-dimensional positions.
PoissonDistribution
Poisson distribution.
PredictiveModel<X, Y>
A model that predicts output Y, given input X. [...]
Random
A generator of random bool, int, or double values. [...]
Rectangle<T extends num>
A class for representing two-dimensional rectangles whose properties are immutable.
Tensor<T>
Superclass for tensors where elements may be integers, real numbers, or complex numbers. [...]
A distribution that samples tensor element values from independent distributions. [...]
TensorPairs<T extends Tensor>
Holds lists x and y for calculating properties such as correlation.
TensorShape
Shape of a tensor. Currently the limit is 4 dimensions. [...]
UniformDistribution
Uniform continuous distribution. [...]
Vector<T>
A vector or scalar. [...]

## Extensions

ComparableCalc
Mathematical/statistical extension methods for iterables where elements implement Comparable.
DateTimeIterableCalc
Mathematical/statistical methods for DateTime iterables.
IterableCalc
Mathematical/statistical extension methods for Iterable types.
NumIterableCalc
Mathematical/statistical extension methods for num iterables.
TensorIterableCalc
Mathematical/statistical methods for `Tensor<double>` iterables.

## Constants

e → const double
Base of the natural logarithms. [...]
`2.718281828459045`
ln2 → const double
Natural logarithm of 2. [...]
`0.6931471805599453`
ln10 → const double
Natural logarithm of 10. [...]
`2.302585092994046`
log2e → const double
Base-2 logarithm of e.
`1.4426950408889634`
log10e → const double
Base-10 logarithm of e.
`0.4342944819032518`
pi → const double
The PI constant.
`3.1415926535897932`
sqrt1_2 → const double
Square root of 1/2.
`0.7071067811865476`
sqrt2 → const double
Square root of 2.
`1.4142135623730951`

## Functions

acos(num x)
Converts `x` to a double and returns its arc cosine in radians. [...]
asin(num x)
Converts `x` to a double and returns its arc sine in radians. [...]
atan(num x)
Converts `x` to a double and returns its arc tangent in radians. [...]
atan2(num a, num b)
A variant of atan. [...]
binomialCoefficient(int n, int k) int
Binomial coefficient ("given N items, how many combinations have K items?"). [...]
Converts `radians` to a double and returns the cosine of the value. [...]
exp(num x)
Converts `x` to a double and returns the natural exponent, e, to the power `x`. [...]
factorial(int k) int
Factorial function. [...]
log(num x)
Converts `x` to a double and returns the natural logarithm of the value. [...]
max<T extends num>(T a, T b) → T
Returns the larger of two numbers. [...]
min<T extends num>(T a, T b) → T
Returns the lesser of two numbers. [...]
pow(num x, num exponent) num
Returns `x` to the power of `exponent`. [...]
Converts `radians` to a double and returns the sine of the value. [...]
Converts `x` to a double and returns the positive square root of the value. [...]
Converts `radians` to a double and returns the tangent of the value. [...]