Basically, you're looking at floating point inaccuracy for fractions.

J uses IEEE754 64 bit binary floating point numbers.
https://en.wikipedia.org/wiki/IEEE_754#. These numbers can represent
fractional powers of 2 exactly, but cannot represent fractional powers
of 5 exactly.

So, 5^-1 2 3 4 are all represented inexactly, and, thus, 10^-1 2 3 4
are all represented inexactly.

You can see this here:

    (*!.0)_0.5+10*1|0.05+i. 10 10
 0  1 _1 _1 _1 _1 _1 _1  1  1
 1  1  1  1  1  1  1  1  1  1
 1  1  1  1  1  1  1  1  1  1
 1  1 _1 _1 _1 _1 _1 _1 _1 _1
_1 _1 _1 _1 _1 _1 _1 _1 _1 _1
_1 _1 _1 _1 _1 _1 _1 _1 _1 _1
_1 _1 _1 _1 _1 _1 _1 _1 _1 _1
_1 _1 _1 _1 _1 _1 _1 _1 _1 _1
_1 _1 _1 _1 _1 _1 _1 _1 _1 _1
_1 _1 _1 _1 _1 _1 _1 _1 _1 _1

I hope this makes sense,

--
Raul


On Tue, Aug 10, 2021 at 3:34 AM Pablo Landherr <[email protected]> wrote:
>
> I just came across this result:
>
> 0j1":0.05+i. 10 10
>
> 0.1 1.1 2.0 3.0 4.0 5.0 6.0 7.0 8.1 9.1
>
> 10.1 11.1 12.1 13.1 14.1 15.1 16.1 17.1 18.1 19.1
>
> 20.1 21.1 22.1 23.1 24.1 25.1 26.1 27.1 28.1 29.1
>
> 30.1 31.1 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0
>
> 40.0 41.0 42.0 43.0 44.0 45.0 46.0 47.0 48.0 49.0
>
> 50.0 51.0 52.0 53.0 54.0 55.0 56.0 57.0 58.0 59.0
>
> 60.0 61.0 62.0 63.0 64.0 65.0 66.0 67.0 68.0 69.0
>
> 70.0 71.0 72.0 73.0 74.0 75.0 76.0 77.0 78.0 79.0
>
> 80.0 81.0 82.0 83.0 84.0 85.0 86.0 87.0 88.0 89.0
>
> 90.0 91.0 92.0 93.0 94.0 95.0 96.0 97.0 98.0 99.0
>
> JVERSION
>
> Engine: j807/j64/darwin
>
> Release-d: commercial/2019-03-18T16:07:14
>
> Library: 8.07.26
>
> Qt IDE: 1.7.10/5.9.8
>
> Platform: Darwin 64
>
> Installer: J807 install
>
> InstallPath: /applications/j64-807
>
> Contact: www.jsoftware.com
>
>
> My question: is there a simple explanation to which numbers are rounded up
> and which are rounded down using ":
>
>
> Kind regards,
>
> Pablo
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to