Re: [csswg-drafts] [css-values-4] Should arguments to min/max get simplified when only partial simplification is possible? (#4756)

But how do you decide which functions should be special-cased with this arguments simplifications? For example `hypot()` could be a candidate since mathematically

```
hypot(x, y, z) = hypot(hypot(x, y), z)
```

The problem is that in practice there can be a loss of precision, e.g. with JS in Firefox I get

```js
Math.hypot(0, 1, 5);             // 5.099019513592785
Math.hypot(Math.hypot(0, 1), 5); // 5.0990195135927845
```

So, if this simplification is added only to `min()` and `max()`, will authors also expect it for `hypot()`? And if it's also added to `hypot()`, will authors expect the precision loss?

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

Received on Tuesday, 3 March 2020 23:45:55 UTC