Re: [Bug-apl] Rational Numbers

2017-07-20 Thread Elias Mårtenson
There is an error in the rational code: In Archive.cc, line 218, the snprintf format is wrong. %lld is used, while the types of the arguments are actually "long". Thus, "%lld÷%lld" should be "%ld÷%ld" instead. On 21 July 2017 at 12:06, Elias Mårtenson wrote: > I haven't looked at this yet, but

Re: [Bug-apl] Rational Numbers

2017-07-20 Thread Elias Mårtenson
I haven't looked at this yet, but is this purely a display feature, or is it a full implementation of rational numbers? In other words, is the result of 1÷3 exact? And if so, how do I convert a rational number into a floating-point number? Regards, Elias On 21 July 2017 at 00:05, Juergen Sauerma

Re: [Bug-apl] E in number printing style (scientific notation)

2017-07-20 Thread Juergen Sauermann
Hi Ala'a you cant control it. The rules when the E-notation is to be used is described in the IBM APL2 language reference, page 13. So there is little that can be changed without violating that reference. However, you may want to have look at dyadic ⍕ (called Format by example and Format by spec

[Bug-apl] E in number printing style (scientific notation)

2017-07-20 Thread Ala'a Mohammad
Hi, Is it possible to control when the interpreter uses the 'E' or display the number without it? I know of quad print precision, but it did not affect the printing of notation used for displaying these numbers when I played with it. I'm asking this because on one side I understand that this nota

[Bug-apl] Rational Numbers

2017-07-20 Thread Juergen Sauermann
Hi, coming back to a proposal from Elias, I have added (experimental) support for rational numbers in GNU APL. SVN 982. It has to be enabled explicitly: ./configure RATIONAL_NUMBERS_WANTED=yes In APL you can displa