|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Fuzzy Floor and Ceiling |
Date: | Fri, 14 Aug 2015 19:57:56 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi Mike, the problem with relative ⎕CT is that when the N gets large, say > ÷⎕CT then N×⎕CT becomes > 1 so the interval around N where you would round up (for ⌊) contains one integer or even several. The ISO intention seems to be that only numbers that are slightly smaller than N but very close to N should be handled like N and not like N-1. Mathematically I see no good reason why this interval should grow when N gets larger. Another problem is that the IBM APL implementation differs from the IBM APL2 description, which says (APL2 language reference manual page 133): Z←R For real numbers, yields the largest integer that does not exceed R (within the comparison tolerance). That is essentially what ISO says and what GNU APL has implemented. The observed behavior of the IBM APL2 implementation seems to be (within R times the comparison tolerance), which is probably unintentional. /// Jürgen On 08/14/2015 07:34 PM, Mike Duvos
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |