Re: [css3-values] Required minimum precision

On 6/28/12 3:21 PM, Tab Atkins Jr. wrote:
> During the last telcon, we claimed that we hadn't posted our proposal
> for required minimum precision.  We're dumb - it was already in the
> draft:<http://dev.w3.org/csswg/css3-values/#limits>.
>
> So, we need to either approve this, edit it, or defer it to level 4.
>
> Thoughts?  Can implementors please take a look and let us know if
> these limits are acceptable minimums?

Two questions:

1)  Where does an absolute value of (2^24)-1 come from?  Since this is 
talking about signed quantities, it's requiring that at least 25 bits be 
used to represent them, which is a slightly odd behavior.  Was this 
supposed to use (2^23)-1 ?

2)  Implementing the "except that values that are not equal to, but 
would round to, either zero or the boundary of a closed range, are 
rounded away from that value rather than to it." might be rather 
difficult.  Consider a decimal value like 
0.99999999999999999999999999999999999999999999 which will give you 1.0 
when converted to an IEEE double, for example.  The only way I see to 
avoid this becoming 1.0 is for the UA to reinvent the string-to-double 
wheel in a way that allows the rounding behavior described in the spec 
(and in particular, in a way that does not make use of existing 
string-to-double libraries, which do not have any such behavior 
defined).  In this particular case the UA could add a hack like "check 
the first digit", but things get more complicated if we add scientific 
notation or calc().  I'm not quite sure what the best course of action 
here is....

-Boris

Received on Thursday, 28 June 2012 19:37:34 UTC