[libmath-prime-util-perl] 16/18: Update rand function in test - Win32 32-bit needs mod instead of and

Partha P. Mukherjee ppm-guest at moszumanska.debian.org
Thu May 21 18:46:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.17
in repository libmath-prime-util-perl.

commit 4e13e5d5faf0c68cfc406d9d4706e3635b517de2
Author: Dana Jacobsen <dana at acm.org>
Date:   Thu Dec 20 00:51:37 2012 -0800

    Update rand function in test - Win32 32-bit needs mod instead of and
---
 t/31-threading.t | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/31-threading.t b/t/31-threading.t
index b9a952f..d968a65 100644
--- a/t/31-threading.t
+++ b/t/31-threading.t
@@ -110,7 +110,7 @@ thread_test(
 {
   my $seed = 1;
   sub mysrand { $seed = $_[0]; }
-  sub rand { $seed = (1103515245*$seed + 12345) & 0xFFFF_FFFF; $seed/(0xFFFF_FFFF+1); }
+  sub rand { $seed = (1103515245*$seed + 12345) % 4294967296; $seed/4294967296.0; }
 }
 
 thread_test(

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git



More information about the Pkg-perl-cvs-commits mailing list