home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11326 < prev    next >
Encoding:
Text File  |  1992-07-22  |  1.4 KB  |  46 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!usc!sdd.hp.com!mips!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!laphroaig!cflatter
  3. From: cflatter@nrao.edu (Chris Flatters)
  4. Subject: Re: Power Operator vs NANs
  5. Message-ID: <1992Jul22.151649.27527@nrao.edu>
  6. Sender: news@nrao.edu
  7. Reply-To: cflatter@nrao.edu
  8. Organization: NRAO
  9. References: <849@nazgul.UUCP>
  10. Date: Wed, 22 Jul 1992 15:16:49 GMT
  11. Lines: 33
  12.  
  13. In article 849@nazgul.UUCP, bright@nazgul.UUCP (Walter Bright) writes:
  14. >I don't have the specs in electronic form. But they have been included in
  15. >the latest ANSI C++ mailing.
  16. >
  17. >The additional operators are:
  18. >    <    less
  19. >    >    greater
  20. >    <=    less or equal
  21. >    >=    greater or equal
  22. >    ==    equal
  23. >    !=    unordered, less or greater
  24. >    !<>=    unordered
  25. >    <>    less or greater
  26. >    <>=    less, equal or greater
  27. >    !<=    unordered or greater
  28. >    !<    unordered, greater or equal
  29. >    !>=    unordered or less
  30. >    !>    unordered, less or equal
  31. >    !<>    unordered or equal
  32. >
  33. >
  34. >Unordered means one or both operands is a NAN.
  35.  
  36. Could someone summarize the rationale for introducing these new operators.
  37. If arithmetic conforms to IEEE-754 then the existing comparison operators
  38. should deal with unordered quantities.  You can view IEEE-754 as a collateral
  39. standard: if a translator conforms both to the C++ standard and to IEEE-754
  40. then IEEE-754 defines the behaviour of certain operators in circumstances
  41. where the (as yet non-existent) C++ standard leaves them undefined.
  42.  
  43.     Chris Flatters
  44.     cflatter@nrao.edu
  45.  
  46.