Hi, everybody.
Since we have not yet finalized the minutes of 03-23 WG2 meeting. I'd
like add one more point about random floating-point number API.
In the meeting, John Cowan demonstrated a part about random
floating-point number of CLtL
(<
https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node133.html>)
CLtL noted that, The accepted pratice of generating a random
floating-point in range [A ,B) is first generate a qualified random
floating-point in range [0, 1), then use affine transformation X * (B -
A) + A to scale it.
However, Frédéric Goualard in his paper "Drawing random floating-point
numbers from an interval" (<
https://hal.science/hal-03282794v2>) points
out that: due to the specific properties of IEEE-754, the affine
transformation above will map serveral floats in [0, 1), to the same
float in [A, B) in some cases, thus break the uniformity.
See the Section 2 of his paper for more formal and detailed explanation.
Therefore, I believe that a potential random floating-point API should
allow users to specify custom intervals, rather than being limited to
[0, 1).
P.S.: When compiling the minutes, please feel free to include the points
here as an addendum if necessary, Thanks :)
--
Retrieve my PGP public key:
执行下列命令以获取我的 PGP 公有密钥:
gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC
Zihao / 閱卜錄