|
[Date Index]
[Thread Index]
[Author Index]
Re: avoiding non-machine numbers
- To: mathgroup at smc.vnet.net
- Subject: [mg115588] Re: avoiding non-machine numbers
- From: Achilleas Lazarides <achilleas.lazarides at gmx.com>
- Date: Sat, 15 Jan 2011 04:47:22 -0500 (EST)
I have this in my init.m:
switchCatchUnderflow[]:==(SetSystemOptions[CatchMachineUnderflow->#1]&)[!CatchMachineUnderflow/.SystemOptions[CatchMachineUnderflow]]
which flips the option indicated. I get:
In[65]:== Exp[-#^2] &@
RandomReal[NormalDistribution[0, 20], 400000]; // Timing
switchCatchUnderflow[];
Exp[-#^2] &@RandomReal[NormalDistribution[0, 20], 400000]; // Timing
Out[65]== {1.62773, Null}
Out[67]== {0.12662, Null}
On Jan14, 2011, at 12:17 PM, wpb wrote:
> t == RandomReal[NormalDistribution[0, 20], 400000];
> Exp[-t^2]; // Timing
Prev by Date:
Re: Interpolation of a tabulated function
Next by Date:
Re: DesignerUnits 2011-01-08 for Mathematica 8, 7, 6
Previous by thread:
avoiding non-machine numbers
Next by thread:
Re: avoiding non-machine numbers
|