Re: [csswg-drafts] [css-values] mod(−0, +∞) and mod(+0, −∞) not handled correctly (#4723)

Re-reviewing this, I think I agree that the current behavior (`mod(-0, infinity)` yielding `-0`) is indeed wrong. I believe there are two reasonable approaches here:

* Flip it to the appropriately-signed zero instead, just like `mod(-0, 5)` yield `+0`; while we can't tell what value a `mod(-1, infinity)` should resolve to, "0 away from infinity" is just infinity and thus in the 0 equivalence class ^_^
* Pay attention to sign first, so a wrong-signed zero yields NaN like any other wrong-signed value would.

I'm relatively ambivalent between the two, but weakly prefer the second; a process which approaches -0 is doing so from the negative side, where all the similar non-zero negative values produce NaN, and so I think it's slightly better to be consistent there.

Thoughts?

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


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

Received on Thursday, 21 October 2021 22:43:28 UTC