mir-math 0.0.1

Dlang Math Library


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Gitter Bountysource

Circle CI Build Status Build status

Dub version Dub downloads License

mir-math

Dlang Math Library

import mir.math.sum;
import std.algorithm.iteration: map;
import std.math, std.range;
auto ar = 1000
    .iota
    .map!(n => 1.7L.pow(n+1) - 1.7L.pow(n))
    .array;
real d = 1.7L.pow(1000);
assert(sum!(Summation.precise)(ar.chain([-d])) == -1);
assert(sum!(Summation.precise)(ar.retro, -d) == -1);

Documentation

Documentation [WIP] API can be found here. Read also the Mir blog.

Contents

  • mir.math.func.expdigamma - Exp(Digamma(x)) function.
  • mir.sum Functions and Output Ranges for Summation Algorithms. Works with user-defined types.
  • Precise algorithm: improved analog of Python's fsum
  • Pairwise algorithm: fast version for Input Ranges
  • Kahan, KBN, and KB2 algorithms

Authors: Ilya Yaroshenko

Dependencies: mir-internal

Versions:
0.0.1 2016-Nov-27
~master 2017-Mar-29
Show all 2 versions
Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 2584 downloads total