0

I have written java code for finding taxicab numbers using math.cbrt(a) function. I assumed the complexity of math.cbrt(a) is constant. I am really interested in knowing the complexity of this function such that I can know how good my algorithm works. Visit Finding taxicab Numbers

Community
  • 1
  • 1
Nikhitha Reddy
  • 285
  • 7
  • 19
  • please refer this you could understand. http://math.stackexchange.com/questions/2815/find-taxicab-numbers-in-on-time Thank you – Cruzer Feb 16 '15 at 09:42

1 Answers1

1

This method is native, so exact call depends on VM implementation. Eg. OpenJDK use fdlibm as you can check here http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/9b8c96f96a0f/src/share/native/java/lang/StrictMath.c

and fdlibm implementation is here http://www.netlib.org/fdlibm/s_cbrt.c which seems to be constant.

farincz
  • 4,943
  • 1
  • 28
  • 38