On Thu, 29 Jul 2021, Ben Gorte wrote:

After

z =: 281474976711954

compare

<.z%32
8796093022249
and

z <.@:% 32

8796093022248

<.@:% is recognised as a special combination, see the wiki page: https://code.jsoftware.com/wiki/Vocabulary/SpecialCombinations#Integer_Operations

I am not sure why that happens; it certainly seems incorrect. The libc 'floor' function does not exhibit the same behaviour. If precision is important, using rationals may be a temporary workaround.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to