[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-16 Thread aaz at althenia dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #20 from Andrey Zholos 2011-03-16 22:43:45 UTC --- Good idea. The testcases should be adapted to the code paths in the GCC generators though: for instance, binomial with p > .5 isn't covered there. And BINS should be increased: for in

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-16 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #19 from Paolo Carlini 2011-03-16 18:23:46 UTC --- For the time being at least, for testing I think I'm going to adapt the code in the GNU GSL, it's pretty simple (see randist/test.c) but at least we are 100% safe from the licensing p

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 Paolo Carlini changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #14 from paolo at gcc dot gnu.org 2011-03-14 18:10:47 UTC --- Author: paolo Date: Mon Mar 14 18:10:36 2011 New Revision: 170950 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170950 Log: 2011-03-14 Andrey Zholos PR lib

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #17 from Paolo Carlini 2011-03-14 18:20:33 UTC --- Jakub thanks for reminding me, luckily I noticed your message to the mailing list announcing the branching. Anyway, I went ahead and applied both fixes to 4_6 too, if you want me to

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #16 from paolo at gcc dot gnu.org 2011-03-14 18:17:55 UTC --- Author: paolo Date: Mon Mar 14 18:17:51 2011 New Revision: 170951 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170951 Log: 2011-03-14 Andrey Zholos PR lib

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #15

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #13 from Paolo Carlini 2011-03-14 18:08:35 UTC --- Good idea, yes, something like that.

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread aaz at althenia dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #12 from Andrey Zholos 2011-03-14 18:07:22 UTC --- The double __p also fixes an infinite (maybe) loop in both binomial_distribution(100, .75) and binomial_distribution(100, .25) when _GLIBCXX_USE_C99_MATH_TR1 is defined. I guess th

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #11 from Paolo Carlini 2011-03-14 18:02:41 UTC --- In 4_5-branch I'm going to fix only the first issue.

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #10 from paolo at gcc dot gnu.org 2011-03-14 17:57:53 UTC --- Author: paolo Date: Mon Mar 14 17:57:48 2011 New Revision: 170946 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170946 Log: 2011-03-14 Andrey Zholos PR lib

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #9 from Paolo Carlini 2011-03-14 17:43:33 UTC --- Yes, but really I'd like to have something quite serious in terms of testing, for 4.7.0 at this point. I even have some half-baked code around. By the way, if you are interested in con

[Bug libstdc++/48114] [C++0x] binomial_distribution incorrect for p > .5 and geometric_distribution wrongly implements the TR1 definition

2011-03-14 Thread aaz at althenia dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48114 --- Comment #8 from Andrey Zholos 2011-03-14 17:34:01 UTC --- Ah, yes, I only looked at the C++0x formulas. By the way, testcases for these don't need to sample probabilities. They can just check, say, the first 100 values drawn using a determin