For loop problem in mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg90163] For loop problem in mathematica
- From: PhysNova <skhoshbinfar at gmail.com>
- Date: Tue, 1 Jul 2008 06:59:02 -0400 (EDT)
Hi, i wrote a simple program of evaluating Pi number in M6 to test cpu computation timing, to do this a simple for loop was used: x=0;For[i = 1, i < 10,000,000, i++, x = x + 1/(i^2)];N[Sqrt(6*x),25]// Timing the result was catastrophe! it take few minuates. but i first expect to do this very simple job in few seconds.computation time is just satisfactory up to 100000 cycle. could anyone interperet this falut? our get an idea to improve the result? Tanks
- Follow-Ups:
- RE: For loop problem in mathematica
- From: "Jose Luis Gomez" <jose.luis.gomez@itesm.mx>
- Re: For loop problem in mathematica
- From: "W_Craig Carter" <ccarter@mit.edu>
- Re: For loop problem in mathematica
- From: Sseziwa Mukasa <mukasa@jeol.com>
- RE: For loop problem in mathematica