Re: Arbitrary Precision Integer Math Operators

2018-03-24 Thread mratsim
I'm pretty sure it's not planned for 1.0. Now due to the need of arbitrary precision floating point arithmetic for currencies/finance at Status, we wrapped mpdecimal, available [here](https://github.com/status-im/nim-decimal). Now the wrapper is below low-level and overload like `+` must be

Re: Arbitrary Precision Integer Math Operators

2018-03-22 Thread jzakiya
OK, so core Nim doesn't have an arbitrary precision math capability. Is it something planned for in the roadmap to 1.0?

Re: Arbitrary Precision Integer Math Operators

2018-03-22 Thread mratsim
At Status we require that for cryptographic work and we are developing and supporting the following: * nim-ttmath: [https://github.com/status-im/nim-ttmath](https://github.com/status-im/nim-ttmath). This wraps the [ttmath C++ bignum library](https://www.ttmath.org/). This requires the

Re: Arbitrary Precision Integer Math Operators

2018-03-22 Thread lscrd
To add to Stephan's answer, I have tried both packages when solving puzzles from "Euler project": * "bigints" is pure Nim and has the best API in my opinion, but it is about twice slower than "bignum" and has some issues (see comments in source); it is still a work in progress. * "bignum"

Re: Arbitrary Precision Integer Math Operators

2018-03-22 Thread Stefan_Salewski
Are the nimble packages bignum and bigints not good enough for you? I think one is a wrapper, the other is pure Nim from smart Mr. Felsing.

Arbitrary Precision Integer Math Operators

2018-03-22 Thread jzakiya
I have Ruby/Crystal code that uses arbitrary precision integer numbers (really BIG numbers). Looking at Nim's math libraries they don't appear to be arbitrary precision.