Newly revised Section 10 for ES3.1.

Sam Ruby rubys at intertwingly.net
Mon Jul 14 08:08:31 PDT 2008


Mike Shaver wrote:
> On Thu, Jul 10, 2008 at 9:55 AM, Sam Ruby <rubys at intertwingly.net> wrote:
>> Library additions have less of a concern for interaction with real-world
>> content, but the idea of inserting the code into something that will
>> ultimately ship does appeal to me.  If I were to do the work to put this
>> code into SpiderMonkey(*), would you see it being included in some future
>> release of Firefox?
>>
>> - Sam Ruby
>>
>> (*) And it were to prove to be stable and doesn't break the web, and the
>> function were to make some edition of ECMAScript, and yadda, yadda, yadda.
> 
> I can't see why not -- we'll certainly be looking to implement
> forthcoming editions of ECMAScript, and if decimal is a part of it
> then your code would certainly be helpful!

Did you say "if"?  Grrr....

In any case, how about Firefox 3.1 then?  :-)

http://code.intertwingly.net/public/hg/js-decimal/

I have both instance (BigDecimal) and static (decNumber) methods 
implemented -- the later based on a suggestion by Allen, and will be 
rolled into the 3.1 spec post Oslo.

I still need to do some work on mapping exceptions, but in most cases 
exceptions aren't raised, for example Decimal.divide(1,0) produces 
Infinity.  There also is some ES4 work to be done (e.g., infix operators 
and decimal constants).

I have 81,000+ tests ready to be ported over for decNumber, and can 
produce tests for the instance methods.

- Sam Ruby



More information about the Es4-discuss mailing list