From 184d0d6a644c0a0cb13b8408d52e643b9f2736f1 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Fri, 27 Nov 2009 19:14:28 +0000 Subject: [PATCH] * use full precision in random():extended calculation git-svn-id: trunk@14280 - --- rtl/inc/system.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtl/inc/system.inc b/rtl/inc/system.inc index 2271915a79..834a8f06ae 100644 --- a/rtl/inc/system.inc +++ b/rtl/inc/system.inc @@ -557,7 +557,7 @@ end; {$ifndef FPUNONE} function random: extended; begin - random := cardinal(genrand_MT19937) * (1.0/(int64(1) shl 32)); + random := cardinal(genrand_MT19937) * (extended(1.0)/(int64(1) shl 32)); end; {$endif} {$endif FPC_HAS_FEATURE_RANDOM}