Is there a good lib out there to handle large integer of know size ?

Guillaume Piolat via Digitalmars-d digitalmars-d at puremagic.com
Wed Jan 6 15:09:37 PST 2016


On Wednesday, 6 January 2016 at 22:18:48 UTC, deadalnix wrote:
> On Wednesday, 6 January 2016 at 21:57:13 UTC, Guillaume Piolat 
> wrote:
>> On Wednesday, 6 January 2016 at 21:25:45 UTC, deadalnix wrote:
>>> In my case, I'm interested in 160 and 256 bits integers. 
>>> Using BigInt seems wasteful as I know the integer size I 
>>> want. Do we have something like this around ?
>>
>> https://github.com/d-gamedev-team/gfm/blob/master/math/gfm/math/wideint.d
>>
>> public domain. Slow division. Only power-of-2 bits supported.
>
> That is awesome ! Won't do the 160 bits case, but I can deal 
> with that. Did you consider this as a worthy addition to phobos 
> ? I think it is.

Well I've never ever used them after writing. Perhaps should be 
in their own dub package. Need wideint literals at a minimum!




More information about the Digitalmars-d mailing list