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