Re: [csswg-drafts] [css-syntax-3][css-values-4] Add informative note about tokenization of negative 0 (#7472)

> For a JS implementation of conversion from string to number, following the spec does not help. I have to return unsigned 0 if the conversion equals 0.

Actually, upon review you're right - the "convert a string to a number" algorithm will, upon seeing `"-0"`, set `s` to -1, `i` to 0, the other parts to their default values, and then the expression at the end will multiply -1 by 0 and yield -0 in any IEEE-754-compatible language.

So that's a bug on my part and should be fixed.

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


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

Received on Monday, 11 July 2022 21:40:34 UTC