The OpenD Programming Language

mir.math.numeric

This module contains simple numeric algorithms.

Members

Functions

binomialCoefficient
auto binomialCoefficient(ulong n, uint k)

Quickly computes binomial coefficient using extended precision floating point type mir.bignum.fp.

factorial
auto factorial(ulong count, ulong start)

Quickly computes factorial using extended precision floating point type mir.bignum.fp.

prod
F prod(Range r)

Calculates the product of the elements of the input.

prod
F prod(Range r, long exp)
prod
prodType!Range prod(Range r)
prod
prodType!Range prod(Range r, long exp)
prod
prodType!T prod(T[] ar)
sumOfLog2s
Unqual!(DeepElementType!Range) sumOfLog2s(Range r)

Compute the sum of binary logarithms of the input range r. The error of this method is much smaller than with a naive sum of log2.

sumOfLogs
Unqual!(DeepElementType!Range) sumOfLogs(Range r)

Compute the sum of binary logarithms of the input range r. The error of this method is much smaller than with a naive sum of log.

Structs

ProdAccumulator
struct ProdAccumulator(T)

Meta

Authors

Ilia Ki