Re: How to do numerical computations?

*To*: mathgroup at smc.vnet.net*Subject*: [mg108819] Re: How to do numerical computations?*From*: <ingolf.dahl at telia.com>*Date*: Thu, 1 Apr 2010 06:38:21 -0500 (EST)*Organization*: University of Gothenburg*References*: <201003311028.FAA09410@smc.vnet.net>*Reply-to*: <ingolf.dahl at physics.gu.se>

Yes, surely there is such a method, to give you only the numerical values, just avoid symbolic integration and iterations in your procedures. A good start is to specify that your own functions should only take numeric arguments. As example: f[x_?NumericQ] := x^2 will only evaluate for numeric values of the argument. You have to check each step of your code, and understand what Mathematica really does to it. In most practical cases, it is possible to do all necessary symbolic calculations first, check that carefully, and then use the results to streamline the procedures for the numeric values, if you have many different sets of numerical data to evaluate in the same way. But if you want some more detailed help from the MathGroup, it would help tremendously to know more in detail what your code is doing inside. The details are VERY IMPORTANT for the time required, and often there are many ways to obtain the same result, most slow and a few ways very fast. Ingolf Dahl Sweden -----Original Message----- From: bagarti [mailto:bagarti at gmail.com] Sent: den 31 mars 2010 12:28 To: mathgroup at smc.vnet.net Subject: [mg108819] [mg108786] How to do numerical computations? Hello, Any body please help me, I have written some mathematica code which contains some complicated functions.The functions involve integrations and iterations in the intermediate steps. When I run the code it takes a hell lot of time. I do not know what mathematica is doing inside, actually I have another code in fortran that takes only a few minutes to do all the calculations but there are other problems like it dosent work for some parameter range. Is there a method in which I can ask mathematica to give me only the numerical values just like any executable program does. Thanks. TaB