Bug 29520 - tr1: discrete_distributions vs large floating point values
Summary: tr1: discrete_distributions vs large floating point values
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Paolo Carlini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-19 22:21 UTC by Paolo Carlini
Modified: 2006-10-29 10:52 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-10-19 22:22:12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Carlini 2006-10-19 22:21:37 UTC
This is an internal reminder for an issue which must be fixed before delivering the discrete distributions (geometric, poisson, binomial, in particular): when, in operator(), the floating point result exceeds the max integer value of the return type the value must be rejected.
Comment 1 Paolo Carlini 2006-10-19 22:22:12 UTC
Will fix as soon as I'm nack from a travel...
Comment 2 paolo@gcc.gnu.org 2006-10-29 10:49:18 UTC
Subject: Bug 29520

Author: paolo
Date: Sun Oct 29 10:49:07 2006
New Revision: 118135

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118135
Log:
2006-10-29  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/29520
	* include/tr1/random (geometric_distribution<>::
	operator()(_UniformRandomNumberGenerator&)): Only declare.
	* include/tr1/random.tcc (geometric_distribution<>::
	operator()(_UniformRandomNumberGenerator&),
	poisson_distribution<>::operator()(_UniformRandomNumberGenerator&),
	binomial_distribution<>::operator()(_UniformRandomNumberGenerator&)):
	Reject candidate floating point values not convertible to the
	result_type.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/tr1/random
    trunk/libstdc++-v3/include/tr1/random.tcc

Comment 3 paolo@gcc.gnu.org 2006-10-29 10:49:43 UTC
Subject: Bug 29520

Author: paolo
Date: Sun Oct 29 10:49:30 2006
New Revision: 118136

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118136
Log:
2006-10-29  Paolo Carlini  <pcarlini@suse.de>
	
	PR libstdc++/29520
	* include/tr1/random (geometric_distribution<>::
	operator()(_UniformRandomNumberGenerator&)): Only declare.
	* include/tr1/random.tcc (geometric_distribution<>::
	operator()(_UniformRandomNumberGenerator&),
	poisson_distribution<>::operator()(_UniformRandomNumberGenerator&),
	binomial_distribution<>::operator()(_UniformRandomNumberGenerator&)):
	Reject candidate floating point values not convertible to the
	result_type.

Modified:
    branches/gcc-4_2-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_2-branch/libstdc++-v3/include/tr1/random
    branches/gcc-4_2-branch/libstdc++-v3/include/tr1/random.tcc

Comment 4 Paolo Carlini 2006-10-29 10:52:33 UTC
Fixed for 4.2.0.