Opened 13 years ago
Closed 13 years ago
#4001 closed Patches (invalid)
triangle_distribution produces invalid values (Fix included)
Reported by: | SaBer | Owned by: | No-Maintainer |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | random |
Version: | Boost 1.42.0 | Severity: | Problem |
Keywords: | Cc: |
Description
triangle_distribution produces values which are all over the place, see http://codepad.org/z3G53SfE for an example.
The error is in operator():
result_type u = eng();
should be:
result_type u = uniform_01<result_type>()(eng);
(or something similar).
Note:
See TracTickets
for help on using tickets.
RTFM, the constructor should be given an uniform rng...