The only tolerance in the computation is from the usual tolerant comparison.
Addition isn't associative either, you know.
Henry Rich
On 5/15/2020 7:03 PM, Raul Miller wrote:
It is odd, though, that even with comparison tolerance set to zero, +.
is not associative on fractional floating point values:
9!:19]0
0j16":,.+./4.57 4.34 4.44
0.0000000000000036
0j16":,.+./|.4.57 4.34 4.44
0.0000000000290870
It is commutative though:
(-:|:)+./@>{;~4.57 4.34 4.44
1
0j16":+./@>{;~4.57 4.34 4.44
4.5700000000000003 0.0100000000000655 0.0099999999999758
0.0100000000000655 4.3399999999999999 0.0200000000000466
0.0099999999999758 0.0200000000000466 4.4400000000000004
I'm not quite sure what's going on here... maybe a built in epsilon
which is independent of comparison tolerance?
Thanks,
--
This email has been checked for viruses by AVG.
https://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm