3 ms·
> Name another language where random() is deterministic pretty well all of them, surely? eg. https://learn.microsoft.com/en-us/sql/t-sql/functions/rand-transac
by _a_a_a_ 3y ago
> Name another language where random() is deterministic
pretty well all of them, surely? eg. https://learn.microsoft.com/en-us/sql/t-sql/functions/rand-transact-sql?view=sql-server-ver16 https://learn.microsoft.com/en-us/sql/t-sql/functions/rand-t... "For a specified seed value, the result returned is always the same."
Pretty well every language I'm aware of does it this way. Are we even talking about the same thing?
As for the others you point out, I'm afraid I can't speak for that. I'll just have to accept what you say.
- adgjlsfhk1 3y agoJulia, for example promises that seeded random numbers will only be the same within the minor version and there's a 3rd party package if you need reproducible random numbers. Guaranteeing cross version random number compatibility comes at a pretty major cost for performance (as new better algorithms are discovered) and removes your ability to bugfix the random number generator.