Opened 15 years ago
Closed 14 years ago
#1270 closed Bugs (wontfix)
uniform_smallint doesn't compile with lagged_fibonacci random number generators
Reported by: | Tom Stepleton (last name at ri.cmu.edu) | Owned by: | No-Maintainer |
---|---|---|---|
Milestone: | To Be Determined | Component: | random |
Version: | Boost 1.34.1 | Severity: | Problem |
Keywords: | random uniform_smallint lagged fibonacci lagged_fibonacci compilation error | Cc: |
Description
Code like this:
boost::lagged_fibonacci607 rng; ... boost::uniform_smallint<int> myrand(1,10); int a = myrand(rng);
yields errors like these:
/local/include/boost/random/uniform_smallint.hpp:195: error: invalid operands of types 'double' and 'double' to binary 'operator%' /local/include/boost/random/uniform_smallint.hpp:204: error: invalid operands of types 'double' and 'double' to binary 'operator%'
gcc version 4.0.1 (Apple Computer, Inc. build 5367)
Change History (3)
comment:1 by , 15 years ago
Owner: | set to |
---|
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
uniform_smallint requires the generator to return an integral type. lagged_fibonacci607 returns doubles. Use variate_generator.