|
From: | Jay Foad |
Subject: | Re: [Bug-apl] 0⍟0 |
Date: | Thu, 14 Jul 2016 08:43:38 +0100 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |