mini-gmp and mpq
Marco Bodrato
bodrato at mail.dm.unipi.it
Wed Feb 14 18:53:46 UTC 2018
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: 6483 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-discuss/attachments/20180214/77019cb1/attachment.bin>
More information about the gmp-discuss
mailing list