From: awnbreel AT panix DOT com (Michael R Weholt) Newsgroups: comp.os.msdos.djgpp Subject: Re: modulus operation with floats requires emulator? Date: Sun, 19 Jan 97 02:35:55 GMT Organization: Rookery Prawl Lines: 15 Message-ID: <5bs1cd$t44@news1.panix.com> References: <5br7o7$p2e AT news1 DOT panix DOT com> <5brctb$dap AT lyra DOT csx DOT cam DOT ac DOT uk> NNTP-Posting-Host: mrw.dialup.access.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <5brctb$dap AT lyra DOT csx DOT cam DOT ac DOT uk>, gpt20 AT thor DOT cam DOT ac DOT uk (G.P. Tootell) wrote: >well it's right, they are invalid operands :) you can't use % to modulus >floating point numbers. there may be a function in the math.h library >that lets you do modulus but i don't know it offhand sorry. you could >try looking at math.h however Bill Lanam tells me via email (for which I thank him) that "'%' only works with integers" but that I could use the function 'fmod' which "takes two arguments and returns the remainder." Michael R Weholt http://www.panix.com/~mrw/