MathGroup Archive 2011

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

Search the Archive

Re: Gaps in plotted graph, probably resulting from real values being miscomputed as complex

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123492] Re: Gaps in plotted graph, probably resulting from real values being miscomputed as complex
  • From: Andy Ross <andyr at wolfram.com>
  • Date: Fri, 9 Dec 2011 05:54:23 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

On 12/8/2011 4:22 AM, jdm wrote:
> Plot[Log[2,
>    PDF[NormalDistribution[0, 1],
>      InverseCDF[NormalDistribution[0, 1], (1 - 2^(-x))]]^2], {x, 1,
>    256}, PlotRange ->  {-500, 0}]
>
> plots up to about x=56, and then nothing.
>
> Based on similar behaviour under another system, I suspect that some sort of
> calculation error as 1 - 2^(-x) approaches 1 is causing some of the
> values that should be plotted to be wrongly computed as complex
> numbers, but have no way of confirming this and don't understand why
> the real-valued values aren't being plotted for their corresponding x
> if this is the case.
>
> Can anyone suggest anything?
>
> Thanks,
>
> James McLaughlin.
>

Try boosting the working precision of plot.

Plot[Log[2,
   PDF[NormalDistribution[0, 1],
     InverseCDF[NormalDistribution[0, 1], (1 - 2^(-x))]]^2], {x, 1,
   256}, PlotRange -> {-500, 0}, WorkingPrecision -> 20]

-Andy



  • Prev by Date: Mathematica Question
  • Next by Date: Re: Gaps in plotted graph, probably resulting from real values being miscomputed as complex
  • Previous by thread: Re: Gaps in plotted graph, probably resulting from real values being miscomputed as complex
  • Next by thread: Re: Gaps in plotted graph, probably resulting from real values being miscomputed as complex