Skip to main content
added 119 characters in body
Source Link

I have a program that calculates N digits of Pi.

I have measured that it takes 10x time to calculate 3n numbers, compared with the time for calculating n numbers. The source code also gives an indication for this running times.

For example, if 1000 digits take 0.011 seconds, 3000 digits take 0.11 seconds, and 9000 digits take 1.1 seconds.

What is the Big O complexity of such algorithm?

Edit:

Here's the source code.

I have a program that calculates N digits of Pi.

I have measured that it takes 10x time to calculate 3n numbers, compared with the time for calculating n numbers. The source code also gives an indication for this running times.

For example, if 1000 digits take 0.011 seconds, 3000 digits take 0.11 seconds, and 9000 digits take 1.1 seconds.

What is the Big O complexity of such algorithm?

I have a program that calculates N digits of Pi.

I have measured that it takes 10x time to calculate 3n numbers, compared with the time for calculating n numbers. The source code also gives an indication for this running times.

For example, if 1000 digits take 0.011 seconds, 3000 digits take 0.11 seconds, and 9000 digits take 1.1 seconds.

What is the Big O complexity of such algorithm?

Edit:

Here's the source code.

edited tags
Link
lennon310
  • 3.2k
  • 7
  • 19
  • 35
Repaired broken english and incomplete sentences a bit.
Source Link
Doc Brown
  • 220.7k
  • 35
  • 410
  • 625

I have a program that calculates N digits of Pi.

I have measured that it takes 10x time to calculate 3n numbers, compared with the time for calculating n numbers. The source code also speaks thatgives an indication for this running times.

For example, if 1000 digits take 0.011 seconds, 3000 digits take 0.11 seconds, and 9000 digits take 1.1 seconds.

What is the Big O notationcomplexity of such algorithm?

I have a program that calculates N digits of Pi.

I have measured that it takes 10x time to calculate 3n numbers. The source code also speaks that.

For example, if 1000 digits take 0.011 seconds, 3000 digits take 0.11 seconds, and 9000 digits take 1.1 seconds.

What is the Big O notation of such algorithm?

I have a program that calculates N digits of Pi.

I have measured that it takes 10x time to calculate 3n numbers, compared with the time for calculating n numbers. The source code also gives an indication for this running times.

For example, if 1000 digits take 0.011 seconds, 3000 digits take 0.11 seconds, and 9000 digits take 1.1 seconds.

What is the Big O complexity of such algorithm?

Source Link
Loading