bug-apl
[Top][All Lists]
Advanced

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

[Bug-apl] Circle bugs


From: Kacper Gutowski
Subject: [Bug-apl] Circle bugs
Date: Tue, 30 Jun 2015 01:13:37 +0200

There is a number of problems with circle functions.

Inverse trigonometric and hyperbolic functions ¯1 ¯2 ¯6 ¯7
as well as function 0 are not properly extended to complex
values when given argument is real; they work correctly with
real-valued complex cells:

      0 ¯1 ¯2 ¯6 ¯7 ∘.○ ¯2 ¯2J0
0.000000000             0J1.732050808
0.000000000  ¯1.570796327J1.316957897
0.000000000   3.141592654J1.316957897
0.000000000   1.316957897J3.141592654
0.000000000 ¯0.5493061443J1.570796327


Function ¯4 is incorrect for complex numbers.  It's a simple
programming error as it falls though to computing function
¯3 and returns that instead; it's correct for real cells:

      ¯4 ¯3 ∘.○ 1 1J0
0            0.7853981634
0.7853981634 0.7853981634


Functions 8 and ¯8 seem to choose different branches for
real and complex cells.  I'm not sure which is correct but
it can't be both.

      8○ 1 1J0
0J¯1.414213562 0J1.414213562


Finally, function 12, i.e. arc, always returns zero for
real cells.  It should give ○1 for negative real numbers.


-k



reply via email to

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