mir.math.numeric

This module contains simple numeric algorithms.

Members

Functions

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.

Structs

ProdAccumulator
struct ProdAccumulator(T)

Templates

prodType
template prodType(T)
Undocumented in source.

Meta

License

Apache-2.0

Authors

Ilya Yaroshenko