Numworks - strange random numbers
|
03-06-2023, 11:27 PM
Post: #8
|
|||
|
|||
RE: Numworks - strange random numbers
(03-23-2020 04:34 PM)Albert Chan Wrote: LN(2) = 2 * probability of integer part of RND/RND is odd > sum(rem(floor(random()/random()),2),k,1,10000) / 5000 2 0 2 ... We expected around log(2) = 0.6931, but getting 0 or 2 only. It seems argument inside sum is evaluated only once. random(), and its cousins, should not be treated as normal function. It should never be optimized away. Unfortunately, it seems Numworks fix is like whack-a-mole game. Example, from github fixed issues: random()-random() gets simplified to 0 Above expression, replacing floor(x) = round(x-0.5) work. > sum(rem(round(random()/random()-0.5),2),k,1,10000) / 5000 0.7034 0.6998 0.6938 ... |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Numworks - strange random numbers - LowTech - 03-04-2023, 05:10 PM
RE: Numworks - strange random numbers - Albert Chan - 03-04-2023, 08:02 PM
RE: Numworks - strange random numbers - EdS2 - 03-05-2023, 02:32 PM
RE: Numworks - strange random numbers - ijabbott - 03-06-2023, 08:50 PM
RE: Numworks - strange random numbers - toml_12953 - 03-05-2023, 12:00 AM
RE: Numworks - strange random numbers - LowTech - 03-05-2023, 12:29 PM
RE: Numworks - strange random numbers - Albert Chan - 03-05-2023, 01:17 PM
RE: Numworks - strange random numbers - Albert Chan - 03-06-2023 11:27 PM
RE: Numworks - strange random numbers - toml_12953 - 03-07-2023, 04:47 PM
RE: Numworks - strange random numbers - Albert Chan - 03-07-2023, 07:41 PM
RE: Numworks - strange random numbers - toml_12953 - 03-07-2023, 11:16 PM
|
User(s) browsing this thread: 1 Guest(s)