File 3406-Use-new-syntax-for-power-of-2-float-constants.patch of Package erlang

From 1bfe177d347ecaeefa8c9e1358eddec520c2142f Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Thu, 11 Dec 2025 16:56:44 +0100
Subject: [PATCH 6/7] Use new syntax for power of 2 float constants

---
 lib/stdlib/src/rand.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/stdlib/src/rand.erl b/lib/stdlib/src/rand.erl
index cbf3b63b7b..41a2b94e38 100644
--- a/lib/stdlib/src/rand.erl
+++ b/lib/stdlib/src/rand.erl
@@ -647,7 +647,8 @@ for every possible N for the range.
    bc((V), ?BIT((N) - 1), N)).
 
 %%-define(TWO_POW_MINUS53, (math:pow(2, -53))).
--define(TWO_POW_MINUS53, 1.11022302462515657e-16).
+%%-define(TWO_POW_MINUS53, 1.11022302462515657e-16).
+-define(TWO_POW_MINUS53, 2#1.0#e-53).
 
 %% =====================================================================
 %% Types
@@ -1290,6 +1291,8 @@ uniform_real() ->
 %%-define(TWO_POW_MINUS110, (math:pow(2, -110))).
 %%-define(TWO_POW_MINUS55, 2.7755575615628914e-17).
 %%-define(TWO_POW_MINUS110, 7.7037197775489436e-34).
+%%-define(TWO_POW_MINUS55, 2#1.0#e-55).
+%%-define(TWO_POW_MINUS110, 2#1.0#e-110).
 %%
 -doc """
 Generate a uniformly distributed random number `0.0 < X < 1.0`.
-- 
2.51.0

openSUSE Build Service is sponsored by