Intention is an aspect of the actor. And with
multiple actors, such as a system and a user,
the intentions may not coincide.
When building a model of calculation in a partilar 
system the user may obtain unintended results.
This is the meaning of "unintended" that was used.
Another word could be "counterintuitive", that is
contrary to common-sense expectations, but true.

And I am not convinced that it's a simple and
obvious topic, especially that it requires a
formal proof to demonstrate(*). I arrived at
something which seemed a shocking contradiction 
in my original posting.

It's good that J has a built-in tolerant comparison
transpiring to other related operations.
In most other languages there is just a coding
convention not to compare floats for equality.
It's just that it has some pitfalls -- nothing is
perfect -- and my "intention" was to reveal them.

_______
  *) it's not totally clear how it is a consequence
that t must be less than 1. Something is happening
between 1 and 2 as well:
   _1 (1.9 eq) 1
0
   _1 (2 eq) 1
1
   _1 (1.4 eq) 0.5
0
   _1 (1.5 eq) 0.5
1


--- Roger Hui <[EMAIL PROTECTED]> wrote:

> Tolerant equality in J is exactly as it is in SHARP APL.
> Its current definition is derived after some missteps 
> and has been studied by people whose expertise I respect.
> Implementations based on it have been in continuous use
> since 1977.
> 
> It is incorrect to call the exact comparision of 0 an 
> "unintended misidentification".  There is nothing unintended 
> about it.  It is well-known within SHARP APL circles since 
> 1977; I had known about it since the same date.  It is not
> always spelled out because it is a pretty simple and
> direct consequence of the definition.
> 
> 
> 
> ----- Original Message ----- 
> From: "Oleg Kobchenko" <[EMAIL PROTECTED]>
> To: "Programming forum" <[email protected]>
> Sent: Monday, May 29, 2006 11:58 PM
> Subject: RE: [Jprogramming] Equal tolerance fit conjunction -- again
> 
> So the difference is in the intent. A pragmatical
> aspect of as the linguistical paradigm of J
> continuing the analogy of Parts of Speech, Idioms, etc.
> 
> 1 = 2. Looks like their difference of 1 is huge and
> they do not seem to be identifiable. Now let's shift them
> together away from zero a little,
>    1 =&(+&(2^43)) 2
> 0
>    1 =&(+&(2^44)) 2  NB. Oops, two points with
> 1                    NB. the same difference became one
> 
>    1 -&(+&(2^43)) 2  NB. difference is still the same = 1
> _1
> 
> The above is an example of unintended identifivation.
> 
> Near zero we have the opposite situation, no matter
> how close we move to zero or how stringent we make
> the tolerance, we fail to identify anything close
> with zero itself.
> 
>    0 = 2^_44
> 0
>    0 = 2^_84
> 0
>    0 =!.(2^_300) 2^_84
> 0
> 
> This can be called unintended misidentification.
> 
> Any such examples can result in rounding
> errors in calculations and not necessarily
> based on some unusual application requirements.
> 
> There are alternative implementations of
> relative tolerance. For example in "Safe Comparisons"
> section of http://www.lahey.com/float.htm
> it also can be:
>   x=y if (|x-y)<:(t*|x+y)
> Though it does not resolve the problem with zero.
>   0=y if (|0-y)<:(t*|0+y)  NB. x=0
>   0=y if y<:(t*y)          NB. assume y>0
> We get the same problem.
> 
> 
> P.S. I stated or implied that either J worked incorrectly or that
> any changes needed. The problem is that this topic
> has been shrouded by a cloud of mystery and not
> described with enough detail in the documentaion.
> For example, how to deal with the artifacts of relative
> tolerance; other aspects of tolerance -- so called absolute, 
> which deseves a better name, maybe uniform tolerance.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to