bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Fuzzy Floor and Ceiling


From: Mike Duvos
Subject: Re: [Bug-apl] Fuzzy Floor and Ceiling
Date: Fri, 14 Aug 2015 10:34:25 -0700

Hi Juergen,

You write...

"Summary: For and GNU APL follows the ISO standard while IBM APL2 does not."

While this may be the case, I would argue that the APL2 approach is much more numerically robust than the ISO approach. 

Within the range of contiguous integers exactly representable as 64 bit floats,  only 2049 of them will have a different value after having  ⎕CT=1E¯13 added to them.  For the rest of them, an additional 13 decimal digits of mantissa bits won't fit into the float, and fudging by an absolute ⎕CT will be a no-op.

It is hard to argue that floor and ceiling are "tolerant" if they only do a fuzzy comparison on a few numbers, and a regular comparison on all the rest.

In this case, it would seem that doing it the APL2 way, and not the ISO way, would be the prudent choice.

Regards,

Mike



reply via email to

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