Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!uwvax!oddjob!gargoyle!ihnp4!ihlpa!cptgrp From: cptgrp@ihlpa.ATT.COM (Klappal) Newsgroups: comp.unix.questions Subject: Re: Help needed with fmod() Message-ID: <4808@ihlpa.ATT.COM> Date: Wed, 29-Jul-87 16:07:44 EDT Article-I.D.: ihlpa.4808 Posted: Wed Jul 29 16:07:44 1987 Date-Received: Sat, 1-Aug-87 02:25:39 EDT References: <2363@cvl.umd.edu> Reply-To: cptgrp@ihlpa.UUCP (55542-Klappal,R.L.) Organization: AT&T Bell Laboratories Lines: 33 Keywords: old BSD math library In article <2363@cvl.umd.edu> greg@cvl.umd.edu (Greg Koolbeck) writes: > > Hello, > I am looking for information about a function that was apparently in the >older BSD math libary called fmod. It is called floating modulus in the >comments of the program we have that called it, and the usage appears to be: >double = fmod (double, double). If anyone knows what this turkey did exactly, >or has the source for it, I'd appreciate some help. Incidentally, our site has >a Berkeley source license. My address is: > ARPA: greg@cvl.umd.edu > UUCP: seismo!mimsy!cvl!greg. Please send E-mail if you have any useful >information. Thanks in advance. > Greg Koolbeck It is actually double fmod(arg,addr) double arg; double *addr; { ... } which returned the fractional part, and stored the integer part at *addr. The only problem (I know of) with it is that if a negative number was supplied, both pieces were left negative. (may be a feature, not a bug, but it wasn't what I expected.) Richard Klappal ..ihnp4!chinet!uklpl!rlk or ..ihnp4!ihu1h!rlk