octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54619] randi() is biased


From: Rik
Subject: [Octave-bug-tracker] [bug #54619] randi() is biased
Date: Sun, 19 Mar 2023 20:09:09 -0400 (EDT)

Follow-up Comment #27, bug #54619 (project octave):

@mleitner: Someone has asked over on the Octave Discourse site
(https://octave.discourse.group/t/baffling-expressions-in-randi-implementation/4138)
why the code in randi.m has expressions of this form:


(flintmax() + 1)


It is true that flintmax() is the largest representable integer and that


(flintmax() + 1) == flintmax()


so it would seem that there is a simplification that could be made.  But, I
wanted to ask here since you wrote the code and might have had a reason that I
don't immediately divine.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54619>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]