Hi Gordon,

I'm really happy to hear you're working on a decimal type.  This will 
help us a lot.  

My company needs a decimal type for financial calculations, as we 
make financial software.  I will send you some requirements that I 
think will help you a lot.  But before I take the time to do that, 
let me respond by seconding Ralf's request for the ability to 
communicate with a back-end without losing precision.

In answer to your follow-up question asking for clarification:

1. We would like seamless conversion between Flex decimal on the 
client and Java BigDecimal on the server over LCDS, maintaining 
precision.

2. We would like seamless conversion to and from String, maintaining 
precision.  This would be useful for REST.

- Brian Morearty
  Intuit


--- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> Do you just need to be able to roundtrip between 'decimal' and 
String
> without losing precision? Or have it mapped automatically to some 
Java
> type on the back end without losing precision?
>  
> Gordon Smith
> Adobe Flex SDK Team
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Ralf Bokelberg
> Sent: Wednesday, December 12, 2007 11:28 PM
> To: [email protected]
> Subject: Re: [flexcoders] Request for feedback on decimal math
> 
> 
> 
> One important usecase is the possibility to
> communicate with a backend without loosing precision.
> 
> Cheers
> Ralf.
> 
> On Dec 13, 2007 6:07 AM, Gordon Smith <[EMAIL PROTECTED]
> <mailto:gosmith%40adobe.com> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > The next version of ECMAScript will probably have a 'decimal' 
datatype
> for
> > doing decimal math. Using this datatype, 0.3 + 0.7 would be 
exactly
> 1.0, not
> > something like 0.9999999999999997 as you currently get due to
> conversion
> > from decimal to binary fractions.
> >
> > This datatype would probably support additional precision as well.
> Number
> > only gives you 15 or 16 signficant digits. But if you had, say, 
34,
> you
> > could represent up to 
$99,999,999,999,999,999,999,999,999,999,999.99
> > exactly, and that's pretty large!
> >
> > The Player team is thinking about how to introduce a type like 
this
> even
> > before the ECMAScript spec is complete, hopefully in a way that 
will
> be
> > compatible with the spec. They'd like to gather some input on
> developers'
> > requirements for decimal math. Some questions to think about 
are...
> >
> > What is your use case? Financial calculations? Scientific
> calculations?
> >
> > Are you mainly interested in calculating with decimal rather than
> binary
> > fractions, or in having more significant digits, or are both
> important?
> >
> > Do you need support for an arbitrary number of significant digits
> (i.e.,
> > "infinite precision")?
> >
> > If not, how many significant digits are sufficient?
> >
> > Do you need programmatic control over how much precision is used 
in
> > calculations (e.g., rounding to 5 decimal places in every 
intermediate
> > operation)?
> >
> > Do you need programmatic control over how rounding works? (Round 
down,
> round
> > up, round to nearest, what happens with 1.5, etc.)
> >
> > Do you care about whether a new type like 'decimal' gets 
automatically
> > coerced to other types like Number, int, and uint?
> >
> > - Gordon
>


Reply via email to