I'm still not over this. In addition to UB the Verilog $random C code also relies on some IDB. 1/https://twitter.com/oe1cxw/status/870972176421330945 …
-
-
Replying to @oe1cxw
Namely it assumes that "long" is 32 bits wide and that "float" is using the IEEE binary32 format.
2 replies 0 retweets 1 like -
Replying to @oe1cxw
The latter is ridiculous considering that this is a function that has only integers as in- and outputs! (old seed, new seed, rand val)
1 reply 0 retweets 0 likes -
Replying to @oe1cxw
But internally it first creates a uniformly distributed float random value in range (INT_MIN INT_MAX) and then converts that one to an int.
2 replies 0 retweets 0 likes -
Replying to @oe1cxw
That is so horrible hackish. Why not even select a prng with known properties. Possibly a keyed one.
1 reply 0 retweets 1 like -
Replying to @Kryptoblog
I can only assume its because they made the standard match the horrible (backwards-compatible) implementation they already had.
2 replies 0 retweets 1 like
And the horrible implementation they had was horrible because whoever initially wrote it in ~1983 didn't know anything about RNGs.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.