Created on 2005-07-03.00:00:00 last changed 171 months ago
[ Berlin: Voted to WP. N1932 adopts the proposed resolution in 26.3.5, just above paragraph 5. ]
Proposed resolution:
To achieve this intended behavior, the correct template parameteriztion would be:
typedef subtract_with_carry_01<double, 48, 5, 12> ranlux64_base_01;
The sequence of mantissa bits delivered by this is isomorphic (treating each double as having the bits of two floats) to that delivered by ranlux_base_01.
References:
The fifth of these engines with predefined parameters, ranlux64_base_01, appears to have an unintentional error for which there is a simple correction. The two pre-defined subtract_with_carry_01 engines are given as:
typedef subtract_with_carry_01<float, 24, 10, 24> ranlux_base_01; typedef subtract_with_carry_01<double, 48, 10, 24> ranlux64_base_01;
We demonstrate below that ranlux64_base_01 fails to meet the intent of the random number generation proposal, but that the simple correction to
typedef subtract_with_carry_01<double, 48, 5, 12> ranlux64_base_01;
does meet the intent of defining well-known good parameterizations.
The ranlux64_base_01 engine as presented fails to meet the intent for predefined engines, stated in proposal N1398 (section E):
In order to make good random numbers available to a large number of library users, this proposal not only defines generic random-number engines, but also provides a number of predefined well-known good parameterizations for those.
The predefined ranlux_base_01 engine has been proven [1,2,3] to have a very long period and so meets this criterion. This property makes it suitable for use in the excellent discard_block engines defined subsequently. The proof of long period relies on the fact (proven in [1]) that 2**(w*r) - 2**(w*s) + 1 is prime (w, r, and s are template parameters to subtract_with_carry_01, as defined in [tr.rand.eng.sub1]).
The ranlux64_base_01 engine as presented in [tr.rand.predef] uses w=48, r=24, s=10. For these numbers, the combination 2**(w*r)-2**(w*s)+1 is non-prime (though explicit factorization would be a challenge). In consequence, while it is certainly possible for some seeding states that this engine would have a very long period, it is not at all "well-known" that this is the case. The intent in the N1398 proposal involved the base of the ranlux64 engine, which finds heavy use in the physics community. This is isomorphic to the predefined ranlux_base_01, but exploits the ability of double variables to hold (at least) 48 bits of mantissa, to deliver 48 random bits at a time rather than 24.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg2886 |
2010-10-21 18:28:33 | admin | set | messages: + msg2885 |
2005-07-03 00:00:00 | admin | create |