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

[Pkg-octave-devel] Bug in function acot



Hello,
I have debian Sarge and I find bug in package octave2.1.

I have this packages:
 dpkg -l |grep octave
ii octave 2.1.69-1 GNU Octave language for numerical computatio ii octave-ci 99.09-2 Contributed functions for the GNU Octave lan ii octave-epstk 2.1-1 GNU Octave encapsulated postscript toolkit ii octave-forge 2004.11.16-7 Contributed functions for GNU Octave from ht ii octave-plplot 5.3.1-4 Octave support for PLplot, a plotting librar ii octave-sp 2003-2 Semidefinite Programming functions for GNU O ii octave-statdat 1.0.9-1 GNU Octave package for XML-based data exchan ii octave2.1 2.1.69-1 GNU Octave language for numerical computatio ii octave2.1-doc 2.1.69-1 PDF documentation on the GNU Octave language ii octave2.1-head 2.1.69-1 header files for the GNU Octave language (2. ii octave2.1-html 2.1.69-1 HTML documentation on the GNU Octave languag

When I want plot function acot (inverse cotangent)

fplot('acot(x)',[-10,10])

I see, that I have wrong graph.

Mistake is in file
/usr/share/octave/2.1.69/m/elfun/acot.m

where is function acot defined by formula:

function w = acot (z)

  if (nargin != 1)
    usage ("acot (z)");
  endif

  w = atan (1./z);

endfunction





Right formula is

function w = acot (z)

  if (nargin != 1)
    usage ("acot (z)");
  endif

  w = pi/2 - atan (z);

endfunction

I download octave from http://www.octave.org/download.html

In version 2.0.17 is right formula and in version 2.1.72 and 2.9.4 is wrong version of file acot.m. I submit this bug to bug@octave.org and I hope, that new version of octave will have right version of this file.

You make package from version 2.1.69 which contains bad file acot.m.
Can you replace this file in package for sarge?

Jakub Stryja





Reply to: