[Bug libstdc++/51795] linear_congruential_engine doesn't work correctly

marc.glisse at normalesup dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 27 14:12:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51795

--- Comment #17 from Marc Glisse <marc.glisse at normalesup dot org> 2012-01-27 13:57:43 UTC ---
(In reply to comment #15)
> I'm not sure to understand: is using floating point quantities the way to go or
> not?
> Note we can also use long double.

I don't think there is any guarantee that long double has enough precision.

> I'm particularly worried by generate, as I said, much more than linear
> congruential.

Then it may be safer to implement a slow but exact fallback implementation of
_Mod.

Sorry, I can't look at it in more details right now...



More information about the Gcc-bugs mailing list