[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Increasing precision in octave
From: |
Rob Mahurin |
Subject: |
Re: Increasing precision in octave |
Date: |
Fri, 20 Jun 2008 13:54:59 -0400 |
On Jun 20, 2008, at 10:09 AM, DimitryASuplatov wrote:
Hello,
I want to calculate the p-value with high precision.
I mean that when I use normal_cdf function I get
normal_cdf (real(24),m,s)
ans = 1
and "1" is not enough precision for me. I want to see something like
0.999999999999999999999888
normal_cdf is symmetric about the mean, so if you expect
p = normal_cdf(x,m,s) = 1-ep
for some small ep, you could try
ep = normal_cdf(m-x,m,s)
Mine underflows for m-x = 8s, at ep = 1e-16 (or so). If you care
about smaller differences than this you will need a different algorithm.
--
Rob Mahurin
Dept. of Physics & Astronomy
University of Tennessee phone: 865 207 2594
Knoxville, TN 37996 email: address@hidden