Skip to content

Commit

Permalink
Fix ranlux RNG int64 out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed May 11, 2016
1 parent 2a6a1fe commit 52c8c83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyopencl/clrandom.py
Expand Up @@ -244,8 +244,8 @@ def get_gen_kernel(self, dtype, distribution="uniform"):
c_type = "long"
rng_expr = ("(shift "
"+ convert_long4((float) scale * gen) "
"+ convert_long4(((float) scale / (1<<24)) * gen)"
"+ convert_long4(((float) scale / (1<<48)) * gen)"
"+ convert_long4(((float) scale / (1l<<24)) * gen)"
"+ convert_long4(((float) scale / (1l<<48)) * gen)"
")")

else:
Expand Down

0 comments on commit 52c8c83

Please sign in to comment.