[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #38170] nan package: normcdf override inaccura
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #38170] nan package: normcdf override inaccurate compared to core function |
Date: |
Sun, 31 May 2015 20:23:54 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.0.1 |
Update of bug #38170 (project octave):
Status: None => Patch Submitted
Release: 3.6.2 => other
Operating System: GNU/Linux => Any
Summary: normcdf() becomes inaccurate when package nan is
loaded => nan package: normcdf override inaccurate compared to core function
_______________________________________________________
Follow-up Comment #1:
The following change to the nan package normcdf.m makes it comparable to the
function in Octave:
--- normcdf.m
+++ normcdf.m
@@ -40,7 +40,7 @@
% allocate output memory and check size of arguments
z = (x-m)./s; % if this line causes an error, input arguments do not fit.
-p = (1 + erf(z/sqrt(2)))/2;
+p = erfc(z/-sqrt(2))/2;
z = (s==0);
p((x<m) & z) = 0;
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38170>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #38170] nan package: normcdf override inaccurate compared to core function,
Mike Miller <=