two questions on GMP & C float
Sylvain.Pion at sophia.inria.fr
Sat May 16 18:53:48 CEST 2009
Marc Glisse a écrit :
> On Sat, 16 May 2009, Sylvain Pion wrote:
>>> That is quite a different issue though. These 0s are useful.
>> I think it's the only issue here. Maybe I was just reading between the
>> lines of the OP's mail, because I know the issue.
> I read his question as asking whether .5 would give the mpq 1/2 or
> possibly 2^52/2^53, but I may have misunderstood.
> Not quite related: a function to find the smallest fraction in some
> float interval could be useful, but I am not sure where it would fit
> best (gmp tries to handle float and double as little as possible, mpfi
> is more about conversions that widen an interval, etc).
(I guess you mean a fraction with the smallest denominator?)
Would it be possible that this "smallest" fraction is always representable
by a quotient of floats? In which case you would only need floats
in the interface.
More information about the gmp-discuss