Yes, it does (help) ...
-M

At 2018-03-23 19:35, you wrote:

I suppose so...

Keep in mind that the floating point standard can represent integers
(if they are not too large - after 2^53 it starts losing the ability
to represent some integers).

One way of looking at it is this:

   ":!.20 *:%:5
5.0000000000000008882
   ":!.20 %:*:5


Another way of looking at it is this:

   5 - %:*:5

   5 - *:%:5
_8.88178e_16

I hope this helps,

--
Raul


On Fri, Mar 23, 2018 at 3:31 PM, Martin Kreuzer <[email protected]> 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
----------------------------------------------------------------------
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