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

Right, but at least how every engine implements this right now implies doing maths in `deg` first (because that's the canonical unit). Then convert to radians, and call `tan(<radians>)`, which does the actual tan. So I guess we could convert to degrees and see if it's one of the special cases... But comparing for specific floating point values makes me a bit uneasy, because any floating point error will stop returning `inf` / `-inf`.

An alternative here could be to specify some epsilon for which values very close to `pi/2` etc would return `inf` / `-inf` (but that still isn't great because we need to check for that before actually doing the tangent, IMO... Though maybe it's fine?)

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8527#issuecomment-1455092159 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 13:27:38 UTC