[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-30 Thread paolo at gcc dot gnu dot org
--- Comment #15 from paolo at gcc dot gnu dot org 2007-10-30 13:05 --- Subject: Bug 33815 Author: paolo Date: Tue Oct 30 13:05:26 2007 New Revision: 129769 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129769 Log: 2007-10-19 Paolo Carlini <[EMAIL PROTECTED]> PR libst

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-21 Thread pcarlini at suse dot de
--- Comment #14 from pcarlini at suse dot de 2007-10-21 11:33 --- (In reply to comment #13) > Sure thing. Excellent. > I will need a little bit of time to familiarize myself with the current code. > Also, I will need a little bit of help in finding my way around. E.g., where > do > th

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-21 Thread jkherciueh at gmx dot net
--- Comment #13 from jkherciueh at gmx dot net 2007-10-21 09:49 --- (In reply to comment #12) > In order to have a fully conforming implementation, we need something which > works for *any* source range and *any* target range. Are you willing to > work on that? Would be mainline-only of

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-20 Thread pcarlini at suse dot de
--- Comment #12 from pcarlini at suse dot de 2007-10-20 11:27 --- (In reply to comment #11) > I just tested this. It does a much better job at obfuscating the bias, which > is > still there (after all you are rescaling linearly). If you rescale a domain of > size 16 to a range of size

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-20 Thread jkherciueh at gmx dot net
--- Comment #11 from jkherciueh at gmx dot net 2007-10-20 11:07 --- (In reply to comment #6) > Actually, would be: > > Index: random > === > --- random (revision 129456) > +++ random (working copy) > @@ -1607,7 +1

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-20 Thread pcarlini at suse dot de
--- Comment #10 from pcarlini at suse dot de 2007-10-20 10:05 --- Fixed for 4.2.3. -- pcarlini at suse dot de changed: What|Removed |Added Status|ASSIGNED

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-20 Thread paolo at gcc dot gnu dot org
--- Comment #9 from paolo at gcc dot gnu dot org 2007-10-20 10:03 --- Subject: Bug 33815 Author: paolo Date: Sat Oct 20 10:03:10 2007 New Revision: 129508 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129508 Log: 2007-10-20 Paolo Carlini <[EMAIL PROTECTED]> * include

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-20 Thread paolo at gcc dot gnu dot org
--- Comment #8 from paolo at gcc dot gnu dot org 2007-10-20 10:02 --- Subject: Bug 33815 Author: paolo Date: Sat Oct 20 10:02:34 2007 New Revision: 129507 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129507 Log: 2007-10-20 Paolo Carlini <[EMAIL PROTECTED]> * include

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread paolo at gcc dot gnu dot org
--- Comment #7 from paolo at gcc dot gnu dot org 2007-10-19 17:36 --- Subject: Bug 33815 Author: paolo Date: Fri Oct 19 17:36:03 2007 New Revision: 129493 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129493 Log: 2007-10-19 Paolo Carlini <[EMAIL PROTECTED]> PR libstd

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread pcarlini at suse dot de
--- Comment #6 from pcarlini at suse dot de 2007-10-19 11:26 --- Actually, would be: Index: random === --- random (revision 129456) +++ random (working copy) @@ -1607,7 +1607,8 @@ { typedef type

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread pcarlini at suse dot de
--- Comment #5 from pcarlini at suse dot de 2007-10-19 10:49 --- To wit, this kind of change, you can certainly apply it to the 4.2.1 headers as-is: Index: random === --- random (revision 129456) +++ random (worki

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread pcarlini at suse dot de
--- Comment #4 from pcarlini at suse dot de 2007-10-19 10:46 --- I'm going to commit to mainline a stop-gap solution. If you could confirm, as I believe, that it's at least an improvement, we can have it in 4_2-branch too. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33815

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread jkherciueh at gmx dot net
--- Comment #3 from jkherciueh at gmx dot net 2007-10-19 10:13 --- > Actually, the problem happens only for some specific values of the range, like > eng.max() / 5.5, dividing by 2 or 10 is ok. Indeed, seems a binary arithmetic > problem. I conjecture that the problem happens if and onl

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread pcarlini at suse dot de
-- pcarlini at suse dot de changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de |dot org |

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread pcarlini at suse dot de
--- Comment #2 from pcarlini at suse dot de 2007-10-19 09:40 --- Actually, the problem happens only for some specific values of the range, like eng.max() / 5.5, dividing by 2 or 10 is ok. Indeed, seems a binary arithmetic problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33815

[Bug libstdc++/33815] tr1::uniform_int isn't uniform

2007-10-19 Thread pcarlini at suse dot de
--- Comment #1 from pcarlini at suse dot de 2007-10-19 09:37 --- Note that our implementation has nothing to do with the Boost one. The problem happens when the range is big. Anyway, we know our implementation is naive in this case, we'll look into it. -- pcarlini at suse dot de chan