Re: Exponents in <number>

Dean Jackson wrote:
> 
>>> I'm curious - do you have *any* use-cases for a number that can't be 
>>> plainly stated without exponents?
>>
>> As tempting as it is to sit around all day reading specifications and 
>> looking for inconsistencies, I actually did come across this in real 
>> content. In this case is was for implementing getComputedStyle.
>>
>> Of course, this doesn't mean plainly stating the number is impossible. 
>> I just think that exponents are more user friendly than something like 
>> 0.000000000000001234.
> 
> Another reason to allow this is that most implementors will use 
> printf-type library methods to convert floating point numbers for output 
> as strings. In these cases they'll want to control the number of 
> significant digits displayed and only exponential notation allows such 
> control for very big or small numbers.
> 
> We suspect this is why some browsers have actually implemented 
> exponential notation even though the specification doesn't allow it 
> (and, in the WebKit case for example, breaks round-tripping of computed 
> style at them moment).

Dean, what exactly is your use case here? What property needs to take
values so large or so small that exponentiation and significant digits
make a difference?

~fantasai

Received on Saturday, 6 September 2008 03:28:22 UTC