Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7051 > unrolled thread
| Started by | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| First post | 2011-12-09 11:00 +0000 |
| Last post | 2011-12-09 11:00 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Gaps in plotted graph, probably resulting from real values being miscomputed as complex Heike Gramberg <heike.gramberg@gmail.com> - 2011-12-09 11:00 +0000
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Date | 2011-12-09 11:00 +0000 |
| Subject | Re: Gaps in plotted graph, probably resulting from real values being miscomputed as complex |
| Message-ID | <jbspov$3s7$1@smc.vnet.net> |
This is because Plot uses WorkingPrecision->MachinePrecision by default.
For x=56, 2^(-x) is about 1.4*10^-17. With a MachinePrecision of about
16 this means that 1-2^(-x) is effectively 1. and therefore
InverseCDF[=85] is effectively equal to Infinity for x>56. To plot the
function for x>56 you could increase the working precision in Plot, e.g.
Plot[Log[2,
PDF[NormalDistribution[0, 1],
InverseCDF[NormalDistribution[0, 1], (1 - 2^(-x))]]^2], {x, 1,
256}, PlotRange -> {-500, 0}, WorkingPrecision -> 100]
Heike
On 8 Dec 2011, at 11:22, 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.
>
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web