Decimal Complex Data Representation 1289

General APL language issues

Decimal Complex Data Representation 1289

Postby petermsiegel on Thu Aug 13, 2015 4:48 am

I'm using the MAC version of 14.1 (very nice by the way) and found this:
Code: Select all
      ⎕DR 4343.4
      ⎕dr 3.3j5
      ⎕dr long

This is very welcome, but I checked several manuals (but not EVERY manual and I think I verified they were for 14.1) and they all insist that complex numbers are still 64 bit.

Is the report of 128-bit complex (err, 128× 2, of course) correct?
Posts: 98
Joined: Thu Nov 11, 2010 11:04 pm

Re: Decimal Complex Data Representation 1289

Postby Morten|Dyalog on Thu Aug 13, 2015 12:32 pm

Hi David! Yes, 1289 is correct, in the sense that a complex number is represented using two 64-bit DOUBLE precision floating-point numbers, to each element of a complex array requires 128 bits.

We made the design decision that "nobody would need quad precision decimal complex numbers" (if you are using complex numbers you are doing "engineering", or at least "irrational" math of some description). A result of this is that if you combine floats and complex numbers with ⎕FR=1287, your floats will be converted to 64-bit binary doubles (complex numbers with imaginary part = 0). Which means that:


... because 1E500 cannot be represented as a 64-bit complex number.
User avatar
Posts: 409
Joined: Tue Sep 09, 2008 3:52 pm

Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest