bugGNU Octave - Bugs: bug #41407, Implementation of qfunc in comm...

 
 

bug #41407: Implementation of qfunc in comm package

Submitter:  Tony Richardson <amrichardson>
Submitted:  Thu 30 Jan 2014 06:25:12 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Tony Richardson Open/Closed:  * Closed
Release:  * 3.6.4 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 22 Mar 2015 02:29:32 PM UTC, comment #1: 

Hi Tony, thanks for your bug report and so sorry that this got lost in the flood for so long!

I have implemented your suggestion, this fix will be in the next bugfix release of the communications package:

http://hg.code.sf.net/p/octave/communications/rev/f988b498e891

Mike Miller <mtmiller>
Group Member
Thu 30 Jan 2014 06:25:12 PM UTC, original submission:  

Is it possible to replace the current definition of qfunc in the communications package with this one?

function y = qfunc2(x)
y = erfc(x/sqrt(2))/2;
end

The current implementation returns 0 for arguments greater than about 8.  (It implements qfunc as 1 - normcdf(x) and so relies on the differences between two numbers that are both about 1.)  The implementation above relies on erfc and is good down to machine precision. It doesn't return 0 until the argument is greater than about 38.  The following script illustrates the differences:

k = 0:0.01:20;
figure(1)
subplot(2,1,1)
semilogy(k, qfunc2(k));
ax = axis();
subplot(2,1,2)
semilogy(k, qfunc(k));
axis(ax);

qfuncinv suffers from similar problems, but unfortunately the fix is not so simple.  Octave's implementation of erfcinv returns Inf for arguments smaller than about 1e-17.  MATLAB's implementation doesn't return Inf until the argument is less than 1e-320 or so.  (I know that such small probabilities are uncommon in "regular"
statistics, but not uncommon in digital communications where we may be interested in the probability of one bit error in a billion/trillion/gazillion.)

Tony Richardson

Tony Richardson <amrichardson>

 

(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 mtmiller (Posted a comment)
  • -email is unavailable- added by amrichardson (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-22 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code