help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

New implementations of qfunc, qfuncinv, erfcinv


From: Richardson, Anthony
Subject: New implementations of qfunc, qfuncinv, erfcinv
Date: Wed, 6 Feb 2013 13:43:54 +0000

The function qfunc (in the communications package) is currently implemented as

 

y = 1 – normcdf(x)

 

This implementation returns 0 for values of x greater than about 8.3 (qfunc(8.3) is actually about 5.205E-17 and such small probabilities are or interest when working with bit error probabilities in binary comm problems).  I’ve attached an implementation that calculates qfunc() using:

 

y = erfc(x/sqrt(2))/2;

 

This returns non-zero values for x less than about 39.

 

There are similar problems with the current implementations of erfcinv and qfuncinv (problems here with very small arguments).  To fix these I had originally implemented qfuncinv using a rational approx. from a numerical methods text.  I eventually found a much better method for implementing erfcinv here: http://home.online.no/~pjacklam/notes/invnorm/index.html and rewrote qfuncinv to use that implementation.  (The current implementation of qfuncinv returns Inf for arguments less than 1E-17 or so.  The attached implementation returns finite values for arguments down to about 1E-300.)  The erfcinv web site says that the code can be used for any purpose.

 

If would be nice to have a built-in (C ) implementation of erfcinv, code is available at the web site mentioned above.

 

Anyway,  I hope someone else finds these useful.

 

Tony Richardson

 

Attachment: erfcinv.m
Description: erfcinv.m

Attachment: qfunc.m
Description: qfunc.m

Attachment: qfuncinv.m
Description: qfuncinv.m


reply via email to

[Prev in Thread] Current Thread [Next in Thread]