1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Execution time in Mathematica

  1. Sep 18, 2009 #1
    Kindly tell me how much time it may take to execute the below code in Mathematica software in a P4 Processor. Because I executed the below for nearly 5 mins but still it didn't display answer.

    For[i = 1, i <= 47888755200, i++, If[i == 47888755100, Print]]
  2. jcsd
  3. Oct 16, 2009 #2

    I think we can assume this code is linear. So, what you have to do is:
    For[i = 1, i <= 10000, i++, If[i == x, Print]]

    Where x is (10000/47888755100)*47888755200. Count the time with a function that gives you the time it takes, the time for your computation would be something like t0*47888755200/10000.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook