[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Fwd: qfunc/qfuncinv implementation in communications package
From: |
Richardson, Anthony |
Subject: |
RE: Fwd: qfunc/qfuncinv implementation in communications package |
Date: |
Fri, 25 Jan 2013 19:02:06 +0000 |
> Subject: Re: Fwd: qfunc/qfuncinv implementation in communications
> package
>
> Unfortunately the NaN package replaces the built-in normcdf. When the
> NaN package (version 2.5.5) is loaded in Octave 3.6.2, it gives the wrong
> result:
>
> > normcdf(-18)
> ans = 0
>
> Until this is fixed in the NaN package, erfc(18/sqrt(2))/2 is more certain to
> return the right answer
>
> Nir
normcdf() is implemented using erfc(), so I don't guess it really matter if
qfunc is
implemented using normcdf(-x) or erfc(). I'd just like to see it fixed.
I don't load the NaN package, but I'm rather surprised at the result above.
Also, when I searched for implementations of erfcinv I found a
discussion on the Octave developer list. Apparently the other problem I
mentioned
(with erfcinv) is fixed in the development version.
Tony Richardson
>
> On Fri, Jan 25, 2013 at 10:49 AM, Julien Bect <address@hidden> wrote:
> > On 24/01/13 19:26, Richardson, Anthony wrote:
> >> The function qfunc() in the communications package is currently
> >> implemented as:
> >> y = 1-normcdf(x);
> >
> > It should be normcdf(-x) instead. This is what I get under Octave 3.6.2 :
> >
> > octave:9> 1 - normcdf(7)
> > ans = 1.27986510278788e-12
> >
> > octave:10> normcdf(-7)
> > ans = 1.27981254388584e-12
> >
> > octave:11> 1 - normcdf(18)
> > ans = 0
> >
> > octave:12> normcdf(-18)
> > ans = 9.74094891893730e-73
> >
> > Best regards,
> > Julien.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave