[csswg-drafts] [css-values-5] How should random() handle extremely large ranges / extremely tiny steps? (#11634)

weinig has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-values-5] How should random() handle extremely large ranges / extremely tiny steps? ==
The definition of the CSS random() function (https://drafts.csswg.org/css-values-5/#randomness) could use clarification on the expected math for computing a uniform distribution for ranges where for finite (but very large) `max - min` overflows and equals `infinity`. A naive implementation (or one that is using say, the C++ standard library's [std::uniform_real_distribution](https://en.cppreference.com/w/cpp/numeric/random/uniform_real_distribution)) returns `infinity` for all cases here, but additional work could make this work if that is desired.

A similar problem arises for sufficiently tiny `step` values.

For all other math functions defined by calc, there have been clear IEEE-754 semantics to follow, or explicit algorithms (as with `progress()`). Given the new territory here, it would be useful to be specific in the requirements.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11634 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 2 February 2025 20:44:33 UTC