Page 1 of 1

complex values close to integers

Posted: Wed Aug 31, 2011 1:25 pm
by giangiquario
Dyalog 13.0 help says:

"Complex values sufficiently close to boolean or integral values are accepted by functions which require boolean or integral values"


What is the definition of "sufficiently close"? The []CT looks like not influential.

Thank you for your attention

Re: complex values close to integers

Posted: Wed Aug 31, 2011 6:25 pm
by Roger|Dyalog
"Sufficiently close" is like tolerantly close except computed with a system parameter called fuzz instead of with ⎕ct. That is, x is sufficiently close to y if (|x-y)≤fuzz×(|x)⌈(|y). See http://www.jsoftware.com/jwiki/Essays/Tolerant_Comparison#RegionofTolerantEquality for a geometric interpretation of the "region of sufficiently close". Fuzz is set by your friendly APL vendor when the system is built and is not changeable by the APL user.

The ISO Standard on Extended APL (ISO/IEC-13751:2001(E), aka EAS) provides more respectable names for fuzz: Integer-Tolerance and Real-Tolerance.