| delorie.com/archives/browse.cgi | search |
| Newsgroups: | comp.os.msdos.djgpp |
| From: | Peter Berdeklis <peter AT atmosp DOT physics DOT utoronto DOT ca> |
| Subject: | Re: modulus operation with floats requires emulator? |
| Message-ID: | <Pine.SGI.3.91.970120203617.8259B-100000@chinook.physics.utoronto.ca> |
| Nntp-Posting-Host: | chinook.physics.utoronto.ca |
| Sender: | news AT info DOT physics DOT utoronto DOT ca (System Administrator) |
| Mime-Version: | 1.0 |
| Organization: | University of Toronto - Dept. of Physics |
| In-Reply-To: | <5br7o7$p2e@news1.panix.com> |
| Date: | Tue, 21 Jan 1997 01:42:31 GMT |
| References: | <5br7o7$p2e AT news1 DOT panix DOT com> |
| Lines: | 17 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
On Sat, 18 Jan 1997, Michael R Weholt wrote: > When I try to use the modulus operation, I can only get it to > work using integers, not floats. When I try it with floats, the > debugger reports: "Error: invalid operands to binary %". I get this ^^^^^^^^ compiler, actually > message even when I try including math.h, or adding the -lm link > option. > > Does this mean I have to get the 387 emulator and use it? This means that the mod operator does not work on floats, with or w/o the emulator. Try the function fmod. --------------- Peter Berdeklis Dept. of Physics, Univ. of Toronto
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |