diff --git a/MagickCore/random.c b/MagickCore/random.c
index 33347ed..81f52bc 100644
--- a/MagickCore/random.c
+++ b/MagickCore/random.c
@@ -185,7 +185,7 @@
   random_info->reservoir=AcquireStringInfo(GetSignatureDigestsize(
     random_info->signature_info));
   ResetStringInfo(random_info->reservoir);
-  random_info->normalize=1.0/(double) MagickResourceInfinity;
+  random_info->normalize=1.0/(~0UL);
   random_info->semaphore=AllocateSemaphoreInfo();
   random_info->protocol_major=RandomProtocolMajorVersion;
   random_info->protocol_minor=RandomProtocolMinorVersion;