public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marc.glisse at normalesup dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/51795] linear_congruential_engine doesn't work correctly
Date: Fri, 27 Jan 2012 13:42:00 -0000	[thread overview]
Message-ID: <bug-51795-4-8xu4B7mxNe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51795-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #11 from Marc Glisse <marc.glisse at normalesup dot org> 2012-01-27 13:12:05 UTC ---
(In reply to comment #10)
> Really, I don't think the intent here is involving arbitrary size integers.
> This stuff must be quick, and all the integers are unsigned. I don't think we
> have here something like the templates in time, really.

But if we round first modulo 2^64 then modulo m, it isn't the linear
congruential algorithm it is supposed to be. I think I'd prefer for the
compiler to reject the code when used with values that would make the generator
too slow.

Let me ask on the reflector, to be sure.


  parent reply	other threads:[~2012-01-27 13:12 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09  6:09 [Bug libstdc++/51795] New: " spoon.reloaded at gmail dot com
2012-01-27  7:01 ` [Bug libstdc++/51795] " 3dw4rd at verizon dot net
2012-01-27 10:59 ` paolo.carlini at oracle dot com
2012-01-27 11:23 ` paolo.carlini at oracle dot com
2012-01-27 11:46 ` paolo.carlini at oracle dot com
2012-01-27 12:18 ` paolo.carlini at oracle dot com
2012-01-27 12:47 ` paolo.carlini at oracle dot com
2012-01-27 12:53 ` paolo.carlini at oracle dot com
2012-01-27 13:02 ` paolo.carlini at oracle dot com
2012-01-27 13:06 ` marc.glisse at normalesup dot org
2012-01-27 13:07 ` paolo.carlini at oracle dot com
2012-01-27 13:42 ` marc.glisse at normalesup dot org [this message]
2012-01-27 13:48 ` paolo.carlini at oracle dot com
2012-01-27 13:49 ` paolo.carlini at oracle dot com
2012-01-27 13:55 ` marc.glisse at normalesup dot org
2012-01-27 13:58 ` paolo.carlini at oracle dot com
2012-01-27 14:08 ` paolo.carlini at oracle dot com
2012-01-27 14:12 ` marc.glisse at normalesup dot org
2012-01-27 14:28 ` paolo.carlini at oracle dot com
2012-01-27 21:45 ` spoon.reloaded at gmail dot com
2012-01-27 21:50 ` spoon.reloaded at gmail dot com
2012-01-27 21:51 ` paolo.carlini at oracle dot com
2012-01-27 21:53 ` paolo.carlini at oracle dot com
2012-01-27 21:56 ` spoon.reloaded at gmail dot com
2012-01-27 22:32 ` paolo.carlini at oracle dot com
2012-01-27 23:08 ` marc.glisse at normalesup dot org
2012-01-28  0:34 ` paolo at gcc dot gnu.org
2012-01-28 11:34 ` paolo.carlini at oracle dot com
2012-01-30 16:26 ` paolo.carlini at oracle dot com
2012-02-01 11:12 ` paolo at gcc dot gnu.org
2012-04-29 23:37 ` paolo at gcc dot gnu.org
2012-04-29 23:39 ` paolo.carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-51795-4-8xu4B7mxNe@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).