From: arg AT whangomatic DOT freeserve DOT co DOT uk (Andrew R. Gillett) Newsgroups: comp.os.msdos.djgpp Subject: Forgive me, for I have sinned without including math.h Date: Thu, 24 Jun 1999 12:50:04 +0100 Organization: www.release-dates.co.uk Lines: 14 Message-ID: NNTP-Posting-Host: modem-95.name37.dialup.pol.co.uk X-Trace: news6.svr.pol.co.uk 930225014 16339 62.136.178.95 (24 Jun 1999 11:50:14 GMT) NNTP-Posting-Date: 24 Jun 1999 11:50:14 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: MicroPlanet Gravity v2.11 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I just found a strange anomaly. I had two identical functions in different programs using sin(). Each program gave significantly different results. I eventually found that one of them wasn't including math.h. Adding it fixed the problem. I found that if I called sin() without #including math.h, the compiler would think it returned a fix instead of a double. I found this out when I was doing some tests with fprintf and sin - the compiler told me that a fix couldn't be passed through a ... -- Andrew Gillett http://argnet.fatal-design.com/ ICQ: See homepage You will meet a tall dark stranger. Unfortunately he's holding a large gun. Run for it!