home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11266 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  1.5 KB

  1. Path: sparky!uunet!usc!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb
  2. From: tmb@arolla.idiap.ch (Thomas M. Breuel)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Power Operator vs NANs
  5. Message-ID: <TMB.92Jul21215436@arolla.idiap.ch>
  6. Date: 22 Jul 92 01:54:36 GMT
  7. References: <819@nazgul.UUCP> <1992Jul15.123527.3771@bnr.co.uk> <850@nazgul.UUCP>
  8.     <14hm92INNrt0@agate.berkeley.edu>
  9. Sender: news@ai.mit.edu
  10. Reply-To: tmb@idiap.ch
  11. Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
  12.     Perceptive)
  13. Lines: 21
  14. In-reply-to: jbuck@forney.berkeley.edu's message of 21 Jul 92 18:50:10 GMT
  15.  
  16. In article <14hm92INNrt0@agate.berkeley.edu> jbuck@forney.berkeley.edu (Joe Buck) writes:
  17.  
  18.    One could still implement the comparison operators that you
  19.    describe [i.e., the new NCEG comparison operators] that consider
  20.    the possibility of unordered values (NaNs) and have the same syntax
  21.    work on machines that don't have NaNs.  It would just be that the
  22.    test for two values to be unordered would never come out true on
  23.    such machines.
  24.  
  25. I remain unconvinced (even after having read the NCEG document),
  26. however, that an algorithm that needs to rely on the new NCEG
  27. comparison operators will do anything reasonable on architectures that
  28. don't support NaN's or Inf's.
  29.  
  30. Frankly, I'd much rather have an error flagged at compile time
  31. ("isnan() not defined") than wonder why some numerical algorithm out
  32. of some library goes into an infinite loop once in a blue moon when I
  33. compile it on my non-IEEE machine.
  34.  
  35.                     Thomas.
  36.  
  37.