*:5 is 25 which has an integer square root, so %: *: 5 has a result
which is exactly 5

%:5 does not have an integer result, but instead has a floating point
(approximate) result, so *: %: 5 has a result which is approximately
5.

-- 
Raul




On Fri, Mar 23, 2018 at 2:04 PM, Martin Kreuzer <[email protected]> wrote:
> Having read through
> http://code.jsoftware.com/wiki/Essays/Tolerant_Comparison
> (as far as I managed to follow the reasoning)
> I tried these examples:
>
>    5 (=!.0) %: *: 5
> 1
>    5 (=!.0) *: %: 5
> 0
>
>    5 - %: *: 5
> 0
>    5 - *: %: 5
> _8.88178e_16
>    (*:&%: - %:&*:) 5
> 8.88178e_16
>
> and have been wondering since how/why the order of evaluation would make a
> difference (having expected it to throw a zero in *both* cases).
> I'm aware of the the asymmetric interval boundaries x*1-t ; x%1-t but can't
> figure out whether they might be involved in the differing of results, as
> the tolerance is set to zero.
>
> Anybody volunteering with a layman's explanation..?
>
> -M
>
> ----------------------------------------------------------------------
> 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