News for hackers. Stuff that matters.
Re:Random Numbers in Bash by jwilk on Monday March 27, 2023 @01:41PM (#35329791)
z1 is never used.
Re:Random Numbers in Bash by pmarreck on Monday March 27, 2023 @02:34PM (#35330462)
Good point! chatGPT explained it thusly:

"The Box-Muller transform generates two normally distributed random numbers, z0 and z1, using the two uniformly distributed random numbers u1 and u2. However, only z0 is used in the provided function to create the random number within the given range. If you want to additionally supply z1 in the output, you can." It then provides the modified code.