Re: [csswg-drafts] [css-values-5] Make UA, not author, deal with floating point errors in random() (#11864)

Ah yeah, I was hoping that for a `<number>` type we could go with integers as the rounding epsilon (if we did that idea at all), but you're right, the color functions already put the lie to that. We'd have to make it at least a small fraction of an integer, like .001 or something.

(The point is just to catch floating-point error, which should be multiple orders of magnitude below the value, so we can actually be pretty aggressive in shrinking the epsilon.)

But I do prefer basing it on the step, yeah, and that sidesteps all the issues. Just need to settle on a fraction; 1% seems okay, but as I said, we can be aggressive. Could make it 0.1%, maybe even a millionth.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11864#issuecomment-2707864260 using your GitHub account


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

Received on Saturday, 8 March 2025 01:26:04 UTC