Re: Globally limiting precision or accuracy

*To*: mathgroup at smc.vnet.net*Subject*: [mg61038] Re: Globally limiting precision or accuracy*From*: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>*Date*: Sat, 8 Oct 2005 02:48:53 -0400 (EDT)*Organization*: Uni Leipzig*References*: <di59ru$3it$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi, Mathematica wil always use at least the machine precision and it would not increase the speed when you use fewer digits, because the arithmetic is done by the floating point hardware of your computer and it would take more time to pass the two terms to the FPU, do the operation and round the result to 3 digits, than to pass the terms and do the operation. Regards Jens "Lee Newman" <leenewm at umich.edu> schrieb im Newsbeitrag news:di59ru$3it$1 at smc.vnet.net... | Dear Group, | | Situation | - I have a large neural network model (my own code, not Wolfram's | toolbox) that currently has a run time of about 20hours. | - I am in the process of trying to profile and optimize the code | (mostly matrix computations) to reduce the run time. | - All of the computationas that I do are numerical. | | Questions | (1) If I am not concerned about numerical accuracy beyond 3 decimal | places for any of the computations in the model, can I improve | performance by telling mathematica to globally restrict its accuracy (or | precision) for all computations? | | (2) If so, how do I do this? Is it as simple as setting | $MachinePrecision=3? Is there a global way (rather than local use of | N[]) to ensure that all computations are done numerically, and with | machine precision? | | Thanks, | Lee Newman |