help-octave
[Top][All Lists]
Advanced

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

apparently wrong description of 'arg' function in octave-3.0.5


From: Sergei Steshenko
Subject: apparently wrong description of 'arg' function in octave-3.0.5
Date: Sun, 17 Apr 2011 05:55:35 -0700 (PDT)

Hello,

in octave-3.0.5 'help arg' produces:

"
 -- Mapping Function:  arg (Z)
 -- Mapping Function:  angle (Z)
     Compute the argument of Z, defined as THETA = `atan (Y/X)'.  in
     radians.
".

According to Wiki and my memories from school:

http://en.wikipedia.org/wiki/Inverse_trigonometric_functions :

arctangent      y = arctan x    x = tan y       all real numbers        −π/2 < 
y < π/2  −90° < y < 90°

, i.e. the ranges equivalently are:

−π/2 < y < π/2  −90° < y < 90°
.

The above ranges are insufficient for complex numbers - the range in
radians should be either

-pi .. pi

or

0 .. 2 * pi.

In reality the 'arg' function works correctly:

"
octave:23> 180 / pi * arg(-1 + 0.01i)
ans =  179.43
octave:24> 180 / pi * arg(-1 - 0.01i)
ans = -179.43
",

i.e. it implements -pi .. pi (-180 .. 180 degrees) range - opposed to
what its built-in help message says (because of 'atan' and it's
-pi/2 .. pi/2 range).

Is the description fixed in later 'octave' versions ?

If not, should I file a bug report or this message is sufficient ?

...

'arg' behaves in accordance with 'man 3 carg' which is OK.

Thanks,
  Sergei.



reply via email to

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