octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #59774] The function acot(x) seems to compute


From: anonymous
Subject: [Octave-bug-tracker] [bug #59774] The function acot(x) seems to compute the wrong number for x<0.
Date: Mon, 28 Dec 2020 17:58:48 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0

URL:
  <https://savannah.gnu.org/bugs/?59774>

                 Summary: The function acot(x) seems to compute the wrong
number for x<0.
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 28 Dec 2020 10:58:47 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Imre Patyi
        Originator Email: patyii@ecu.edu
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Dear Octave,

Thank you for making your program available.

I think the function acot whose source code we can see by typing type acot
does not produce the mathematically expected results for negative argument.

You basically have

acot=@(x)atan(1./x) ;

whereas I think you should have

acot=@(x)pi/2-atan(x) ;

See wikipedia, 
https://en.wikipedia.org/wiki/Inverse_trigonometric_functions

for a picture of the graph of

plot(x=linspace(-3,3,1000),acot(x))

and compare it to the one Octave (5.2.0, Windows) produces.

Thank you very much!

Yours sincerely,
Imre Patyi





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59774>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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