1

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)?
Ben
  • 71
  • 1
  • 7
  • Do you use Thread? If this is not the case it is a solution to execute your calculations in parallel. Android is a so-called light operating system, if you execute the whole application on the same process you risk to have latency. It is used in Android for database connect and request for exemple. – F0XS Oct 18 '17 at 12:45
  • Yes, the calculations are performs on a different Threads (using AsyncTask). – Ben Oct 18 '17 at 13:07

0 Answers0