Description

Dlang Math Library

Package Information

Version0.0.1 (2016-Nov-27)
Repository https://github.com/libmir/mir-math
LicenseBSL-1.0
CopyrightCopyright © 2016, Ilya Yaroshenko
AuthorsIlya Yaroshenko
Registered byIlya Yaroshenko
Dependencies

mir-internal

Installation

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

dub.json
dub.sdl

Readme

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

Available versions

0.0.1 ~master