MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Higher precision in Error function Erf[] needed.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127141] Re: Higher precision in Error function Erf[] needed.
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Mon, 2 Jul 2012 05:26:41 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jsbt4i$6pq$1@smc.vnet.net> <jseeua$i3d$1@smc.vnet.net> <jsjqhg$d2j$1@smc.vnet.net> <jsmg81$1jj$1@smc.vnet.net>
  • Reply-to: nma at 12000.org

On 6/30/2012 4:17 AM, Ray Koopman wrote:

>
> Just alter the precision of its input. First define
>
>    f[x_,n_] := 8*(10 - Abs[10 - 20000*SetPrecision[x,n]])
>
> Then
>
>    Plot[Exp@#*(1-Erf@Sqrt@#)&@f[x,20], {x,0,10^-3}, Compiled->False]
>
> works fine.
>

fyi;

using Mathematica 8, the 'Compiled->False' is shown in RED
letters, meaning is not valid option for Plot.

on a side note, I myself, and this is just a styling thing,
when using pure function, find it easier to use @ for
only the RHS of the pure function. Hence the above command
would become

  Plot[ Exp[#] * (1-Erf[Sqrt[#]])& @f[x,20], {x,0,10^-3}]

vs.

  Plot[Exp@# * (1-Erf@Sqrt@#)& @f[x,20], {x,0,10^-3}]

Again, just different styling, all is valid, but for me, I
find the first case above a little easier to read, since @ is
used only for the pure function argument.

regards,
--Nasser




  • Prev by Date: Re: case of inconsistent API between Drop and Part?
  • Next by Date: Re: Numerical integration over an arbitrary 2D domain
  • Previous by thread: Re: Re: Solid modeling using Manipulate
  • Next by thread: Re: Higher precision in Error function Erf[] needed.