bugGNU Octave - Bugs: bug #38170, nan package: normcdf override...

 
 

bug #38170: nan package: normcdf override inaccurate compared to core function

Submitter:  Julien Bect <jbect>
Submitted:  Sat 26 Jan 2013 09:22:12 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Fixed Assigned to:  None
Originator Name:  Julien Bect Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 01 Jun 2015 11:27:54 AM UTC, comment #3: 

Fixed in nan version 2.7.6.

Mike Miller <mtmiller>
Group Member
Sun 31 May 2015 09:35:45 PM UTC, comment #2: 

Adding NaN package maintainer to cc list

Carnë Draug <carandraug>
Group Member
Sun 31 May 2015 08:23:53 PM UTC, 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;


Mike Miller <mtmiller>
Group Member
Sat 26 Jan 2013 09:22:12 AM UTC, original submission:  

This problem has been discussed recently on the help-octave mailing list:

http://octave.1599824.n4.nabble.com/qfunc-qfuncinv-implementation-in-communications-package-tt4649078.html#none

normcdf() becomes inaccurate when package nan is loaded


octave:1> normcdf(-10)
ans =  7.6199e-24
octave:2> pkg load nan
octave:3> normcdf(-10)
ans = 0


The problem has been reproduced under Octave 3.6.2 and 3.6.4-rc1, with nan 2.5.5.

Julien Bect <jbect>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by carandraug (Alois Schloegl - maintainer of NaN package)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jbect (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-01 mtmiller StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2015-05-31 carandraug Carbon-Copy- Added -email is unavailable-
    2015-05-31 mtmiller StatusNone Patch Submitted
        Release3.6.2 other
        Operating SystemGNU/Linux Any
        Summarynormcdf() becomes inaccurate when package nan is loaded nan package: normcdf override inaccurate compared to core function

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code