Re: [PHP-DEV] ext-random: add random_float() ?

2022-12-29 Thread Tim Düsterhus
Hi On 12/20/22 07:27, Go Kudo wrote: Now that my work is done, I was thinking about a proposal for a sunsetting of existing functions for PHP 8.3 based on the features introduced in ext-random, and I realized that there is no alternative to `lcg_value()`. Essentially, this could be completely r

Re: [PHP-DEV] ext-random: add random_float() ?

2022-12-29 Thread Tim Düsterhus
Hi On 12/20/22 09:15, Hans Henrik Bergan wrote: btw while we're on the topic, does anyone know if this function gives biased results/is-safe or not? i honestly don't know: function random_float(float $min, float $max): float { if ($min > $max) throw new \InvalidArgumentException("min must b