[csswg-drafts] [css-values] Consider removing asymptotic special-cases for tan() (#8527)

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

== [css-values] Consider removing asymptotic special-cases for tan() ==
https://w3c.github.io/csswg-drafts/css-values/#trig-infinities has:

> In tan(A), if A is one of the asymptote values (such as 90deg, 270deg, etc), the result must be +∞ for 90deg and all values a multiple of 360deg from that (such as -270deg or 450deg), and −∞ for -90deg and all values a multiple of 360deg from that (such as -450deg or 270deg).
>
> > Note: This is only relevant for units that can exactly represent the asymptotic values, such as [deg](https://w3c.github.io/csswg-drafts/css-values/#deg) or [grad](https://w3c.github.io/csswg-drafts/css-values/#grad). [rad](https://w3c.github.io/csswg-drafts/css-values/#rad) cannot, and so whether the result is a very large negative or positive value can depend on rounding and precise details of how numbers are internally stored. It’s recommended you don’t depend on this behavior if using such units.

Given:

 * At the time we evaluate the tan() function the engine usually has forgotten the original specified units (we do most of the calc math in canonical units).
 * It makes the code slower for common cases, to handle an extremely rare and mathematically-undefined case.
 * We already have the undefined result in the spec for radians.
 * No engine implements this special-case afaict.

I'd prefer to remove the special-case for degrees here. Wdyt @tabatkins?

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


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

Received on Sunday, 5 March 2023 12:02:18 UTC