home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!rbg.informatik.th-darmstadt.de!misar
- From: misar@rbg.informatik.th-darmstadt.de (Walter Misar)
- Newsgroups: comp.lang.c
- Subject: Re: Unknown library call info wanted.
- Date: 21 Jan 1993 17:38:18 GMT
- Organization: TH Darmstadt
- Lines: 33
- Distribution: world
- Message-ID: <1jmn2aINNipd@rs2.hrz.th-darmstadt.de>
- References: <1993Jan19.164340.3547@frog.CRDS.COM>
- NNTP-Posting-Host: rbhp61.rbg.informatik.th-darmstadt.de
-
- In article <1993Jan19.164340.3547@frog.CRDS.COM>, miket@frog.CRDS.COM (Michael C Tiernan) writes:
- >
- > This seems to be the most appropriate place for this so here
- > goes.
- >
- > I've got a piece of PD code which is fine EXCEPT for one library
- > call:
- > "dist = copysign(d2 / argp->intervals, argp->distg)"
- >
- > Does anyone out there know what 'copysign' does specifically?
- > I can assume what it does but I'd like to get a really specific
- > description maybe in the form of a manual page from some system
- > so I can write a substitute for it.
-
- I found it in a manpage on a sun4:
- > #include <math.h>
- ....
- > double copysign(x,y)
- > double x, y;
- ....
- > copysign(x,y) returns x with y's sign bit.
-
- double copysign(double x, double y)
- { if (y>=0) return fabs(x);
- else return -fabs(x);
- }
-
- should do as a replacemant.
-
- --
- Walter Misar | It is impossible to enjoy
- misar@rbg.informatik.th-darmstadt.de | idling thoroughly unless
- | one has plenty of work to do.
-