Does D have any number theory libraries?

Imperatorn johan_forsberg_86 at hotmail.com
Mon Nov 8 20:20:49 UTC 2021


On Monday, 8 November 2021 at 20:09:26 UTC, Imperatorn wrote:
> On Monday, 8 November 2021 at 19:59:35 UTC, Enjoys Math wrote:
>> In particular what I need are the fast implementations of:
>>
>> 1. The Nth prime number.
>> 2. Prime Omega and/or Mobius function.
>> 3. Works with some type of BigInt.
>> 4. Primorial.
>> 5. Divisors of N.
>> 6. Extended GCD algorithm.
>>
>> They don't have to be the state-of-the art, but it would be 
>> nice if they didn't simply do the bruteforce algorithm 
>> everywhere.
>
> Check out Mir:
> https://github.com/libmir
>
> And std.numeric:
> https://dlang.org/library/std/numeric.html
>
> Primes:
> https://code.dlang.org/packages/math-primes
>
> Möbius:
> https://rosettacode.org/wiki/M%C3%B6bius_function#D

GMP:
https://code.dlang.org/packages/gmp-d

Linear algebra:
https://github.com/kaleidicassociates/lubeck

SciD:
https://github.com/DlangScience/scid

https://johanengelen.github.io/ldc/2016/10/11/Math-performance-LDC.html


More information about the Digitalmars-d-learn mailing list