Mail Archives: djgpp/1997/07/12/06:54:35
Gareth Davies wrote:
>
> I'm pretty new to C, and this has really got me stuffed. Can anybody
> give me a hand?
... snip ...
> but the sin() function has been returning weird values.
> void main()
no no and no again: int main(void)
... snip ...
> printf("sin(45) = %f\n", sin(45));
... snip ...
> Do I need to get djgpp version 3? At the moment, I've got version 2.
no.
in ANSI C, the trigonometric functions take the angle in RADIANS as
their argument.
why can't people just assume that they are doing something wrong rather
than assuming that it is the library function that is at fault? when my
programs crash, i first look at _my_ code.
--
Sinan
*******************************************************************
A. Sinan Unur WWWWWW
|--O+O
mailto:sinan DOT unur AT cornell DOT edu C ^
http://www.people.cornell.edu/pages/asu1/ \ ~/
Unsolicited e-mail is _not_ welcome, and will be billed for.
*******************************************************************
- Raw text -