mirror of
https://github.com/dlang/phobos.git
synced 2025-05-09 21:11:57 +03:00
21 lines
1.1 KiB
Text
21 lines
1.1 KiB
Text
`MersenneTwisterEngine` has been updated so that its template signature
|
|
matches the C++11 standard (adding two new template parameters, an extra
|
|
tempering parameter `d` and the initialization multiplier `f`).
|
|
|
|
Handling of the word size `w` has been fixed so that the generator will
|
|
now properly handle cases where it is less than the number of bits in
|
|
the chosen `UIntType`. This has been validated against the behaviour
|
|
of a widely-used implementation of the C++11 standard.
|
|
|
|
For anyone using the standard template instantiation `Mt19937` this will
|
|
have no noticeable effect. However, these will be breaking changes for
|
|
anyone using the `MersenneTwisterEngine` template directly.
|
|
|
|
The internal implementation has been reworked to use Ilya Yaroshenko's
|
|
highly optimized algorithm from `mir.random`. This should have a very
|
|
noticeable positive effect for anyone who cares about generating a lot
|
|
of random numbers quickly.
|
|
|
|
A new `Mt19937_64` template instantiation has been added, corresponding
|
|
to the standard 64-bit implementation of the algorithm (MT19937-64).
|
|
This fixes $(LINK https://issues.dlang.org/show_bug.cgi?id=10900).
|