|
From: | Elias Mårtenson |
Subject: | Re: [Bug-apl] Rational Numbers |
Date: | Fri, 21 Jul 2017 12:19:50 +0800 |
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,EliasOn 21 July 2017 at 00:05, Juergen Sauermann <address@hidden> wrote: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 display rational numbers by setting ⎕PS[1]:
⎕PS←0 22
2÷3
╔════════════╗
║0.6666666667║
╚════════════╝
⎕PS←1 22
2÷3
╔═══╗
║2÷3║
╚═══╝
(The second item in ⎕PS is a boxing style as in the ]BOXING command).
Best Regards,
Jürgen
[Prev in Thread] | Current Thread | [Next in Thread] |