- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 22 Jan 2020 11:28:47 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `Double precision math in calc()`, and agreed to the following: * `RESOLVED: Math precision in CSS is currently kept undefined` <details><summary>The full IRC log of that discussion</summary> <fremy> Topic: Double precision math in calc()<br> <RossenTheReal> github: https://github.com/w3c/csswg-drafts/issues/4551<br> <TabAtkins> https://twitter.com/starsandrobots/status/1199757377286754309<br> <myles> s/-infinity sounds odd/does - have to be followed by a digit in order to be classified as a negation? can we actually do -infinity without a parser change?/<br> <fremy> TabAtkins: somebody mentioned that you can use int precision in Blink to implement mod()<br> <tantek_> -1nfinity<br> <fremy> TabAtkins: this is ridiculous, and I think it shouldn't work<br> <fremy> dbaron: what is the consistency difference?<br> <myles> q+<br> <fremy> emilio: Firefox uses floats for everything, but Blink and Webkit use floats only when parsing and simplifying, but inside the math expression in use-value-time, it's float<br> <TabAtkins> s/use floats only/use doubles only/<br> <fremy> TabAtkins: In general, I agree that precision should be kept undefined if we can<br> <fremy> TabAtkins: but TypedOM will allow input any double, so I guess we already have that requirement<br> <fremy> emilio: not really, right now we store as float inside the cssom, typedom is truncated<br> <fremy> myles: also, we could also be able to used fixedpoint<br> <fremy> TabAtkins: but not inside a calc() right?<br> <fremy> myles: not right now, but I would like to keep the option<br> <astearns> ack myles<br> <fremy> myles: also, order of operations would need to be specified for the double-precision to make sense as a requirement<br> <fremy> myles: and I'd like not to have to do this<br> <astearns> ack dbaron<br> <fremy> TabAtkins: based on the concensus in the room, it seems we want to reject this proposal<br> <fremy> dbaron: note that we had compat issues in serialization as dbl vs floats<br> <chris> q+ to mention an upcoming float/double serialization issue<br> <fremy> dbaron: specified values would be in float, but computed values were doubles, and that caused issues<br> <fremy> dbaron: maybe these compat issues are not relevant in the current discussion, but it's interesting to note that if we do, we have 7 random digits at the end<br> <fremy> chris: we also will have similar issues with colors<br> <fremy> TabAtkins: we could specify that we also serialize in float space<br> <fremy> TabAtkins: but myles also wanted to keep fixedpoint, so maybe not<br> <chris> because color() lab() lch() all use float<br> <fremy> TabAtkins: but it's a tangent<br> <dbaron> (as I was talking through it I think I realized the issues I was remembering were about the problem that once you truncate something from double to float, you should never use double-based serialization code to serialize it because you'll then get 6 digits or so tacked on to the end)<br> <fremy> TabAtkins: is there any objection to keep precision undefined for math?<br> <fremy> RossenTheReal: any objection?<br> <fremy> (no objection)<br> <chris> ack c<br> <Zakim> chris, you wanted to mention an upcoming float/double serialization issue<br> <fremy> RESOLVED: Math precision in CSS is currently kept undefined<br> <fremy> iank_: (Chrome could also investigate changing the parser to use floats, but it's not high in our priority list)<br> <fremy> iank_: (right now, it depends on the class where we store it, sometimes a float, sometimes a double)<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4551#issuecomment-577138376 using your GitHub account
Received on Wednesday, 22 January 2020 11:31:33 UTC