From: Moore, Paul (paul.moore_at_[hidden])
Date: 2001-10-19 04:09:56


From: brianjparker_at_[hidden]
> Just a quick note concerning the rational class- I see in the
> documentation that it was decided not to provide a rational
> approximation (from double) function as part of the library.
>
> A good public domain implementation of such a function that I have
> used previously is at
>
> http://www.netlib.org/c/frac
>
> It allows one to provide a relative error bound on the approximation.
> It is in K&R C, but is easily convertible to C++ (just change the
> prototype and remove the fabs() declaration).
>
> I think that it would be useful to add a link to this code in the
> rational documentation.

When this discussion came up before, people came up with lots of conflicting
opinions, and a number of proposed algorithms. I don't have an opinion
myself, and I don't have the expertise to evaluate the options. As such, I'd
rather avoid any impression of "sanctioning" any particular
implementation/algorithm.

So I think I'll continue ducking this issue, and leave the link out.

Thanks for the comments, in any case.
Paul.