bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] 0⍟0


From: Juergen Sauermann
Subject: Re: [Bug-apl] 0⍟0
Date: Wed, 13 Jul 2016 18:42:39 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

Hi,

yes, I meant ⎕CT of course.

I have fixed this without using ⎕CT, SVN 780.

My point was that for integer arguments ⎕CT makes no difference, but for real and
complex numbers as soon as you do computations with them they tend to quickly catch
rounding errors and the comparisons A=B and A=1 are then very likely to fail even if
the numbers are almost equal or close to 1.

So using ⎕CT would have made more sense to me.

/// Jürgen


On 07/13/2016 01:36 PM, Kacper Gutowski wrote:
On 13 July 2016 at 13:21, Juergen Sauermann wrote:
I see. Which leaves the question if "equal" shall be strict or within ⎕IO.

Since we are dealing with real numbers (and therefore often rounding errors)
within ⎕IO
makes more sense to me but the standard does not mention ⎕IO for ⍟.
I think you mean ⎕CT?  The word “equal” is bolded there which means
it's supposed to be defined earlier and in §5.2.5 you'll find that
“A equals B” when they are the same number.  There is a different
phrase “A is tolerantly-equal to B within” for tolerant equality.

The ⎕CT is not needed here anyway because, as with 0÷0, this is a
continuous extension for {⍵⍟⍵}. When A≠1 and B≠0, A⍟B→1 as A-B→0
and your implementation defined logarithm algorithm shall give
appropriate, close to one, results for A close to B.

-k



reply via email to

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