       Re: A zillion times slower in version 5

• To: mathgroup at smc.vnet.net
• Subject: [mg46427] Re: A zillion times slower in version 5
• From: "Joshua A. Solomon" <J.A.Solomon at city.ac.uk>
• Date: Tue, 17 Feb 2004 07:46:45 -0500 (EST)
• References: <c0k3sd\$8kn\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```David Whitoff, at Wolfram, replies:

Evaluate \$MaxPrecision=10^6 to restore Version 4 behavior.

Otherwise 1-Exp[-(10^((x-a)/20))^b] will compute a result
with a precision of about 5x10^8

Another possible solution is to rearrange the calculation
so that subtracting an astonomically tiny quantity from
an exact number doesn't come up, such as by using

bug[x_, {a_, b_, c_, d_}] :=
c + (1 - c - d)(1.0 - Exp[-(10^((x - a)/20))^b])

> In:= bug[x_,{a_,b_,c_,d_}]:=c+(1-c-d)(1-Exp[-(10^((x-a)/20))^b])
>
> Using Mathematica 4...
>
> In:= {\$Version, \$ReleaseNumber}
> Out:= {4.1 for Mac OS X (November 5, 2001),5}
>
> In:= Timing[bug[-8,{-60,3.5,0.5,0.01}]]
> Out:= {0. Second,0.99}
>
> Using Mathematica 5...
>
> In:= {\$Version, \$ReleaseNumber}
> Out:= {5.0 for Mac OS X (June 10, 2003),0}
>
> In:= Timing[bug[-8,{-60,3.5,0.5,0.01}]]
> Out:= {6.21 Second,0.99}
>
> Six seconds! What is it doing? What is the best way to streamline this?
>
> js
>

```

• Prev by Date: Re:
• Next by Date: Re: output in NMinimize on each step?
• Previous by thread: Re: A zillion times slower in version 5
• Next by thread: Understanding Flatten