Hi Jay, Thanks. That's an interesting bit of info.
IBM APL2 returns 5. According to the APL2 manual, the system uses relative tolerance. With absolute tolerance, as long as they are still using a closed interval around the number, it should still return 5. If I fudge 5 by half the comparison tolerance, it returns 5 in GNU APL. APLs, notably STSC, sometimes approximate tolerant comparision using techniques such as masking to avoid the floating point computational overhead of doing it according to spec. So I guess it's close enough, give or take implementers discretion. Regards, Mike On Wed, Aug 12, 2015 at 1:04 AM, Jay Foad <[email protected]> wrote: > I don't know anything about the GNU APL implementation, but I can tell > you that the definition of tolerant-floor changed between standard APL > (ISO 8485) and Extended APL (ISO 13751). In ISO 8485 the tolerance is > relative, so both your examples should definitely return 5. In > Extended APL the tolerance is absolute, so both your examples are > right on the cusp of whether they should return 5 or the next integer > up/down. > > Jay. > > On 12 August 2015 at 03:25, Mike Duvos <[email protected]> wrote: > > > > ⌊5-⎕CT > > 4 > > > > ⌈5+⎕CT > > 6 > > > > > > Unless something has drastically changed since I last read the APL spec, > > both of these should return 5. > > > > >
