No mod for mpf_t?
Torbjorn Granlund
tg at gmplib.org
Mon Aug 24 12:24:41 CEST 2009
Matthew Lai <cyberfish at wecheer.com> writes:
I have only been using GMP for a few hours, but out of curiosity, is
there no modulus for mpf_t? I can't find any mentioning of it in the
manual, and Google didn't turn up any relevant discussion about this
either. If not, why not?
There isn't one. I don't know why nobody ever wrote one, but perhaps it
is because modulo is usually poorly defined for non-integers.
If you want one, perhaps you could write it? I suggest that you follow
the rules of the ISO/IEC 9899:1990 ("ISO C90") fmod.
--
Torbjörn
More information about the gmp-discuss
mailing list