From: Mike Purtell Newsgroups: comp.os.msdos.djgpp Subject: Re: sin() and cos() ??? Date: Thu, 17 Dec 1998 06:29:08 -0800 Organization: Pacific Gas And Electric Company Lines: 34 Message-ID: <36791533.5B4026CB@pge.com> References: <367833E6 DOT 84CD87A5 AT pge DOT com> <3678B537 DOT F0ACF0AF AT frozenwave DOT com> NNTP-Posting-Host: mtp4ws02.comp.pge.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com O.K. 2PIr-I get it... I use sin(degrees*(2PI/360)) and all is well. I checked the djgpp info and there was no mention of units, only double f(double). So I unfortunately ASSUMED degrees as the units. doh! thanks - Mike Kertis Henderson wrote: > Mike Purtell wrote: > > > > What am I missing ? > > > > I call ... > > > > #include > > #include > > ... > > printf("The SIN of 45 Deg is %.2f\n",sin(45) ); > > and get .851 ?? > > and then > > printf("The COS of 45 Deg is %.2f\n",cos(45) ); > > and get .525 ???? > > ... > > I would expect .707 for both ! > > The sine of 45 radians is .851, and the cosine of 45 radians is .525. > These functions don't take degrees as arguments. > > -- > > Kertis Henderson > kertis AT frozenwave DOT com