home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / prolog / 1551 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.7 KB  |  43 lines

  1. Newsgroups: comp.lang.prolog
  2. Path: sparky!uunet!infonode!ingr!capalo!quintus!quintus!ludemann
  3. From: ludemann@quintus.com (Peter Ludemann)
  4. Subject: Re: fuzzy unification of floating point numbers
  5. Message-ID: <1992Aug17.165013.29853@quintus.com>
  6. Sender: news@quintus.com (USENET news account)
  7. Nntp-Posting-Host: ebisu
  8. Organization: Quintus Corporation, Palo Alto, CA
  9. References:  <1992Aug12.210954.15241@cs.ucla.edu>
  10. Date: Mon, 17 Aug 1992 16:50:13 GMT
  11. Lines: 30
  12.  
  13. In article <1992Aug12.210954.15241@cs.ucla.edu>, mika@oahu.cs.ucla.edu (Mikhail Karpoukhin) writes:
  14. > Does anybody know the prolog for UNIX which supports
  15. > the fuzzy unification of floating point numbers,     
  16. > that is two floating point numbers are considered 
  17. > equal if | X - Y | =< FUZZVALUE  and this FUZZVALUE
  18. > can be changed by user? I know that VM/Prolog has
  19. > this feature, but it works on mainframe.
  20.  
  21. I suspect that IBM Prolog's method is more sophisticated that this,
  22. although the manual implies that an absolute test is done.
  23.  
  24. Quintus Prolog's library has the "fuzzy" module, which defines (I quote):
  25.  
  26.     For a fixed epsilon, the fuzzy comparison predicates are defined
  27.     in section 4.2.2 (Accuracy of floating point arithmetic) of
  28.     Knuth, The Art of Computer Programming, vol 2, Seminumerical Algorithms
  29.     (2nd edition) on page 218.
  30.  
  31.     (21)  'fuzzy <'(U, V) <->  V-U  >  epsilon.b^max(e_u, e_v)
  32.     (22)  'fuzzy ~'(U, V) <-> |V-U| =< epsilon.b^max(e_u, e_v)
  33.     (23)  'fuzzy >'(U, V) <->  U-V  >  epsilon.b^max(e_u, e_v)
  34.     (24)  'fuzzy ='(U, V) <-> |V-U| =< epsilon.b^min(e_u, e_v)
  35.  
  36.     where U = F.b^e_u and |F| < 1
  37.       and V = G.b^e_v and |G| < 1
  38.  
  39. The "fuzzvalue" can be set by the user.
  40.  
  41. ---
  42.     Peter Ludemann  +1-415-813-3800  ludemann@quintus.com
  43.