5 can be represented exactly in floating-point, but %: 5 cannot.
Henry Rich
On 3/23/2018 3:31 PM, Martin Kreuzer wrote:
Looks like I have been mislead by
datatype 5
integer
datatype %: *: 5
floating
datatype *: %: 5
floating
-M
At 2018-03-23 18:25, you wrote:
*: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
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by AVG.
http://www.avg.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm