home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / gnu / gcc / help / 1912 < prev    next >
Encoding:
Text File  |  1992-08-14  |  730 b   |  22 lines

  1. Newsgroups: gnu.gcc.help
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert
  3. From: eggert@twinsun.com (Paul Eggert)
  4. Subject: Re: Question on optimizing "abs()"
  5. Message-ID: <bjh`-lLh@twinsun.com>
  6. Sender: usenet@twinsun.com
  7. Nntp-Posting-Host: farside
  8. Organization: Twin Sun, Inc
  9. References: <34264@cbmvax.commodore.com>
  10. Distribution: gnu.gcc.help
  11. Date: Sat, 15 Aug 1992 00:09:40 GMT
  12. Lines: 8
  13.  
  14. schmid@deneb.cbmvax.cbm.commodore.com (Bob Schmid) writes:
  15.  
  16. >I would like to write code for gcc 2.2 that will take the absolute
  17. >value of a double in the fastest possible way.
  18.  
  19. Why not just use the `fabs' function?  On my machine (GCC 2.2.2 -O,
  20. Sparc, SunOS 4.1.2) `fabs' takes just one machine instruction, e.g.
  21. `fabss %f0,%f0'.
  22.