- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Sat, 08 Feb 2020 23:54:40 +0000
- To: public-css-archive@w3.org
@jrus You are saying `-0 ≡ 5 (mod 5)`, but `5 ≡ +0 (mod 5)`, so `-0 ≡ +0 (mod 5)`. Unlike `rem()`, the nice property of `mod()` is that it always returns the same value for the same equivalence class. Breaking this for -0 doesn't seem worth it. We would also loose idempotency. What's cotpi? > But mod(x, ∞) for any x is nonsensical either way; it implies dividing by 0. Not necessarily. What `mod(A, B)` does is it projects `A ∈ ℝ` into its equivalence class `[A] ∈ ℝ / Bℤ`, and then takes it back to `ℝ` by choosing the only representative of `[A]` in the interval `[0, B)`. There is no division. If `B→∞`, `Bℤ` basically becomes `{-∞, 0, +∞}`. So `[A] = {A}` (maybe except `[0] = {-∞, 0, +∞}`). Then, - For positive finite `A`, it seems clear that `mod(A, ∞) = A`, since `[A]` has no other representative. - For negative finite `A`, we could also say `mod(A, ∞) = A`. But then we would loose the property that `mod()` never returns a negative number. So NaN is reasonable, meaning that it's not possible to get a representative of `[A]` in the interval `[0, ∞)`. -- GitHub Notification of comment by Loirooriol Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4723#issuecomment-583788756 using your GitHub account
Received on Saturday, 8 February 2020 23:54:42 UTC