bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] RNG


From: Kacper Gutowski
Subject: Re: [Bug-apl] RNG
Date: Thu, 19 May 2016 06:12:19 +0200

On Thu, May 19, 2016 at 12:37 AM, Xiao-Yong Jin wrote:
> Now,
>       (22⍴8)⊤2⊥63⍴1
> 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>
> Dyalog does the same thing.
> Can someone please explain to me why?

Because the result of ⊥ doesn't fit into integer and it gets converted to a
floating point number which makes it lose precision.  This is contrary to what
you would like, sorry about that, but now (¯1+2*63)=2⊥63⍴1 which is
mathematically correct; although it's also true that (2*63)=¯1+2*63.

-k



reply via email to

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