bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Equal incorrect for non-real arguments


From: Juergen Sauermann
Subject: Re: [Bug-apl] Equal incorrect for non-real arguments
Date: Tue, 15 Jul 2014 20:09:40 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5

Hi Kacper,

thanks , fixed in SVN 376.

Except that (not so obviously) :

      1E¯15 = 1E¯14
0
/// Jürgen


On 07/15/2014 11:55 AM, Kacper Gutowski wrote:
When either of arguments of = has imaginary part of magnitude greater
than comparison tolerance, a domain error is thrown.

      ⎕CT
1E¯13
      0J1 = 0J1
DOMAIN ERROR
      0J1=0J1
      ^  ^

There are no conditions under which = is allowed to throw a domain
error at all so this is serious.


When it returns a value, it's still incorrect:

      0J¯1E¯15 = 0J1E¯15
1
      1E¯15J¯1E¯15 = ¯1E¯15J1E¯15
1

Both should be 0 regardless of ⎕CT because signs differ (arguments
are not in the same half-plane).  It's handled correctly for reals:

      ¯1E¯15 = 1E¯15
0


On the other hand:

      ⎕CT
1E¯13
      1J1E¯15 = 1J1E¯14
0
      1E¯15J0 = 1E¯14J0
0
      1E¯15 = 1E¯14
1

All obviously should be 1.


-k




reply via email to

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