MathGroup Archive 2012

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

Search the Archive

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

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.


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}]


  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.


  • 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.