[DOC-CVS] [doc-en] master: Document underflow limitation in Randomizer::getFloat()

[email protected] (Louis-Arnaud Catoire via Christian Weiske) Fri, 6 Mar 2026 07:31:14 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Louis-Arnaud Catoire (lacatoire)
Committer: Christian Weiske (cweiske)
Date: 2026-03-06T08:31:11+01:00

Commit: https://github.com/php/doc-en/commit/1ada637cc85509600575389eaacfe42af72f4b23
Raw diff: https://github.com/php/doc-en/commit/1ada637cc85509600575389eaacfe42af72f4b23.diff

Document underflow limitation in Randomizer::getFloat()

Changed paths:
  M  reference/random/random/randomizer/getfloat.xml


Diff:

diff --git a/reference/random/random/randomizer/getfloat.xml b/reference/random/random/randomizer/getfloat.xml
index 2f55b3ef90d0..eae8ac7578cd 100644
--- a/reference/random/random/randomizer/getfloat.xml
+++ b/reference/random/random/randomizer/getfloat.xml
@@ -341,6 +341,15 @@ Lat: +69.244304 Lng: -53.548951
     to obtain the desired behavioral properties.
    </para>
   </note>
+  <caution>
+   <para>
+    Underflow is intentionally left unhandled in the γ-section algorithm.
+    This may result in incorrect values being returned for intervals with
+    boundaries in the subnormal range of floating point numbers, i.e.
+    for values smaller than approximately
+    <literal>2<superscript>-1020</superscript></literal> (about <literal>8.9e-308</literal>).
+   </para>
+  </caution>
  </refsect1>
 
  <refsect1 role="seealso">