From: Oriol Brufau via GitHub <sysbot+gh@w3.org>

Date: Mon, 29 Jul 2019 16:59:37 +0000

To: public-css-archive@w3.org

Message-ID: <issues.opened-474157286-1564419576-sysbot+gh@w3.org>

Date: Mon, 29 Jul 2019 16:59:37 +0000

To: public-css-archive@w3.org

Message-ID: <issues.opened-474157286-1564419576-sysbot+gh@w3.org>

Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-values] Are sqrt(X) and pow(X, .5) equivalent for âˆ’âˆž? == From https://drafts.csswg.org/css-values/#funcdef-sqrt > `sqrt(X)` and `pow(X, .5)` are equivalent; `sqrt()` is a common enough function that it is provided as a convenience. According to https://drafts.csswg.org/css-values/#exponent-infinities, > In `sqrt(A)`, if A is +âˆž, the result is +âˆž. If A is less than 0, the result is NaN. > In `pow(A, B)`, if A is negative, B must be an integer, or else the result is NaN. so it seems both `sqrt(âˆ’âˆž)` and `pow(âˆ’âˆž, 0.5)` should be NaN. But there is also a table for infinity values which says that `pow(âˆ’âˆž, 0.5)` should be +âˆž. > A is -âˆž, B is > 0: result is -âˆž if B is an odd integer, +âˆž otherwise And there is this note: > All of these behaviors are intended to match the "standard" definitions of these functions as implemented by most programming languages, in particular as implemented in JS. But `sqrt(X)` and `pow(X, .5)` are not equivalent in JS: ```js Math.pow(-Infinity, 0.5) // +Infinity Math.sqrt(-Infinity) // NaN ``` Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4157 using your GitHub accountReceived on Monday, 29 July 2019 16:59:39 UTC

*
This archive was generated by hypermail 2.4.0
: Tuesday, 5 July 2022 06:41:50 UTC
*