[v3] c++0x std::ratio implementation

Chris Fairles chris.fairles@gmail.com
Fri Jul 4 12:32:00 GMT 2008


On Sun, Jun 29, 2008 at 4:22 PM, Chris Fairles <chris.fairles@gmail.com> wrote:
> I'm assuming std::ratio has been accepted which could very well be
> wrong. If it has (or good chance it will be) then I've attached an
> implmentation based off of N2615 (
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2615.html#ratio
> ). One notable issue is std::ratio_less. I've just left the naive
> impl. but I think I have a way that avoids overflow using the
> coefficients of the continued fraction representation. Still trying to
> nail down the algorithm. Any thoughts/suggestions/concerns welcome.
>
> Chris
>

Updated patch.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Changelog_ratio.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080704/93d95344/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_ratio.txt
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080704/93d95344/attachment-0001.txt>


More information about the Libstdc++ mailing list