Ben
Ben

Reputation: 81

Arithmetic calculations in Apfloat arbitrary precision library for Android (Java) - low performance on weak devices

I'm working on a project in Android Studio (Java) which need to calculate arithmetic expressions with complex numbers while using arbitrary precision method (maximum accuracy). I'm using in Apfloat library (based on arbitrary precision) in my project. This library provides maximum accuracy and contains a lot of math functions.

I need to get the calculation results immediately (as much as possible without calculation delay). I defined all (Apfloat) variables at 100 digits precision in order to prevent cumulative inaccuracy of the final result.

The problem is that the calculation time on old\weak devices (like Samsung S3) is too slow. For example a calculation of simple expression like: sin(x1)*sin(x2)*sin(x3) it takes at least few seconds on weak devices.

My questions are:

  1. How can I boost the performance and decrease the calculation time?
  2. Does Apfloat is fitting for this purpose?
  3. Are there other alternatives to Apfloat which provide better performance (according to needs)?

Upvotes: 1

Views: 345

Answers (0)

Related Questions