12.07.2015 Views

Programmer's Guide & Language Reference - Dyalog Limited

Programmer's Guide & Language Reference - Dyalog Limited

Programmer's Guide & Language Reference - Dyalog Limited

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 1: Introduction 26ComparisonIn comparing two complex numbers X and Y, X=Y is 1 if the magnitude of X-Y doesnot exceed ⎕CT times the larger of the magnitudes of X and Y; geometrically, X=Y ifthe number smaller in magnitude lies on or within a circle centred on the one withlarger magnitude, having radius ⎕CT times the larger magnitude.As with real values, complex values sufficiently close to Boolean or integral valuesare accepted by functions which require Boolean or integral values. For example:12 1202j1e¯14 ⍴ 120 ⍱ 1j1e¯15Note that <strong>Dyalog</strong> APL always stores complex numbers as a pair of 64-bit binary floating-pointnumbers, regardless of the setting of ⎕FR. Comparisons between complexnumbers and decimal floating-point numbers will require conversion of the decimalnumber to binary to allow the comparison. When ⎕FR=1287, comparisons arealways subject to ⎕DCT, not ⎕CT - regardless of the data type used to represent anumber.This only really comes into play when determining whether the imaginary part of acomplex number is so small that it can be considered to be on the real plane. However,<strong>Dyalog</strong> recommends that you do not mix the use of complex and decimalnumbers in the same component of an application.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!