mini-gmp and mpq

Marco Bodrato bodrato at mail.dm.unipi.it
Wed Feb 14 20:36:27 UTC 2018


Ciao,

the message wasintended for gmp-devel, but of course was not off-topic on
discuss too.

Il Mer, 14 Febbraio 2018 7:53 pm, Marco Bodrato ha scritto:
> Ciao,
>
> Il Mar, 13 Febbraio 2018 7:38 pm, Daniele Panozzo ha scritto:
>> Is there any plan to extend mini-gmp to rationals (mpq)? This would
>> really
>> make it perfect for my use case.
>
> Curious request. We sometimes discussed about modularising mini-gmp. This
> request would benefit of such a modularisation.
>
> It shouldn't be too difficoult to add the mpq layer; at least if you don't
> need to deal with floats types nor strings.
>
> I tried to write some functions, just to see how difficoult it could be. I
> attach a possible implementation. Would it fit your needs?
>
> Of course, extending mini-gmp would not only mean writing some simple
> functions, but also integrating them in the existing code and, this is
> REALLY IMPORTANT, writing some tests!
>
> The attached code was NOT TESTED in any way! It can be a starting point.

Ĝis,
m

-- 
http://bodrato.it/papers/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mini-mpq.c
Type: text/x-csrc
Size: 6597 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-devel/attachments/20180214/e14d663a/attachment.bin>


More information about the gmp-devel mailing list