Summary: uniform(float,float) pops first, uniform(int,int) pops
           Product: D
           Version: 2.030
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos

I noticed in random.d, uniform template, that popFront is called in different
locations for integral compared to floating point types: for integral types you
.front first and .popFront afterwards, but for floating point types you start
with .popFront and then check .front.

This has a peculiar effect: for example, if you do uniform(0.0,100.0) followed
by uniform(0,100) there's a big chance that the integral part of the first
random number is equal to the second random number.

import std.stdio, std.random;
void main()

The location of .popFront should be standardized, either before or after any

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to