Zsolt,

I hear what you are saying and generally agree, however we have been
using calculations 'plagued by rounding errors' for centuries and our
bridges are not collapsing. Such is a nature of a calculator, even
scientific one.

there is a reason, why Math Java API or even Apache Commons Maths use
doubles everywhere:
http://download.oracle.com/javase/6/docs/api/java/lang/Math.html
http://commons.apache.org/math/

The reason being speed and simplicity.

Now looking at BigDecimal API
(http://download.oracle.com/javase/6/docs/api/java/math/BigDecimal.html),
how would you calculate say cube root of said BigDecimal or maybe any
trigonometrical function?

Right tools for right problems kind of thing...



On Wed, Apr 13, 2011 at 9:49 AM, Zsolt Vasvari <zvasv...@gmail.com> wrote:
> The OP is talking about a calculator app.  He should absolutely be
> using BigDecimals, which take care of rounding issues.  I'd certainly
> wouldn't want to download a calculator app that's plauged by rounding
> errors.
>
>> All physical scientific calculators use floating points. There are
>> places, where you cannot use anything else than BigDecimals, like
>> financials, cryptography (large primes), ...
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Daniel Drozdzewski

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to