bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Integer - rational multiplication anomaly


From: Juergen Sauermann
Subject: Re: [Bug-apl] Integer - rational multiplication anomaly
Date: Wed, 16 Aug 2017 13:53:37 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Frederick,

thanks, fixed in SVN 996.

/// Jürgen


On 08/16/2017 06:55 AM, Frederick Pitts wrote:
Hello all,

	With gnu-apl configured with RATIONAL_NUMBERS_WANTED=YES, I
observe the following:

      ⎕PS ← 1 22
      x ← 3 ÷ 1
      x + 1 ÷ 2
╔═══╗
║7÷2║
╚═══╝
      x × 1 ÷ 2
╔═══╗
║1.5║
╚═══╝

	The last result should be 3÷2. In general, multiplication of
integers and rationals should yield rationals or integers (which are
rationals with a denominator of 1), not floats.  The exception would be
when the numerator or denominator of an intermediate rational result
overflows the integer range.

Regards,

Fred 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]