From:  Rosario19 <Ros@invalid.invalid>
Date:  07 Jul 2019 04:15:23 Hong Kong Time
Newsgroup:  news.alt119.net/comp.lang.apl
Subject:  

Re: Possible bug Nars2000

NNTP-Posting-Host:  null

On Sat, 6 Jul 2019 14:58:32 -0400, Bob Smith wrote:

>On 7/6/2019 12:07 PM, J. Clarke wrote:
>> On Sat, 06 Jul 2019 16:37:36 +0200, Rosario19 
>> wrote:
>> 
>>> On Sat, 06 Jul 2019 16:36:15 +0200, Rosario19 wrote:
>>>
>>> >from the Windows calculator:
>>>> 2295655831212461065151424 / 1901165= 1207499523298851527,9586064334237
>>>>
>>> >from NARS2000 
>>>> NARS2000 (Win32) Version # 0.5.5.1
>>>>
>>>>
>>>> MPIR Version #3.0.0
>>>> GMP Version #6.0.0
>>>>
>>>>        floor 2295655831212461065151424x ÷ 1901165x
>>>> 1207499523298851528
>>>>
>>>> for me it should be 1207499523298851527
>>>
>>> where floor is the corrispondece character in the APL language
>> 
>> Also occurs in 5.10.0.
>> 
>> 'i' ?dc 2295655831212461065151424x ÷ 1901165x (where ? is quad)
>> returns 1207499523298851527
>
>As it turns out these result are all correct.  The comparison with the 
>Windows calculator misses the fact that APL use Comparison Tolerance 
>(?CT) when comparing FP numbers (and NARS2000 also uses ?CT when 
>comparing MP Integer/Rational numbers).  The default value for ?CT in 
>NARS2000 is 3E¯15, and as the actual result of the division is 
>1207499523298851527.958606433423716510666, the correct Floor of that 
>number within ?CT is 1207499523298851528.
>
>In order to obtain the same result as the Windows calculator:
>
>       ?CT?0
>       ?2295655831212461065151424x ÷ 1901165x
>1207499523298851527
>
>You might ask, Why use ?CT when comparing MPIRs?  Some time ago I wrote 
>a paper on that topic which outlines the arguments pro and con.

i'am a beginner...
the question for me was, if the type big rational it has NARS2000 can
be a big integer... 

i see + operation on big number exist, 
so - so * multiplication

what i did not find was division...
than now i find it too (using division and APL floor for type
rational) and so i could use rational as big integer...

if one has +-*/ operations, how for example C standard define on
unsigned (so trucate division as C ecc) for me one can calculate all
using big int...

Thank you very much
 
>Although the current implementation of NARS2000 happens to use ?CT when 
>comparing MPIRs, in my mind, that question is still unsettled.
>
>I would greatly appreciate any comments you all might have to help 
>settle it.