|
From: Daniel G. <sp...@ho...> - 2001-11-11 19:04:06
|
<html><div style='background-color:'><DIV>
<P>Don't you have to use the sin() function on a different line? like</P>
<P>x = sin(f);</P>
<P>printf("The sine for f is f",%f, %x); ? </P></DIV>
<DIV></DIV>
<DIV></DIV>>From: Mihkel Pajusalu <MI...@YA...>
<DIV></DIV>>To: dev...@li...
<DIV></DIV>>Subject: [Dev-C++] Math error
<DIV></DIV>>Date: Sun, 11 Nov 2001 10:43:13 -0800 (PST)
<DIV></DIV>>
<DIV></DIV>> Hello,
<DIV></DIV>>
<DIV></DIV>> I wrote a very simple programme to test function
<DIV></DIV>>sin():
<DIV></DIV>>
<DIV></DIV>>#include <STDIO.H>
<DIV></DIV>>#include <MATH.H>
<DIV></DIV>>
<DIV></DIV>>void main()
<DIV></DIV>>{
<DIV></DIV>> float f=1.0f;
<DIV></DIV>> printf("The sine for %f is %f",f,sin(f));
<DIV></DIV>>
<DIV></DIV>>}
<DIV></DIV>>, but it printed on the screen
<DIV></DIV>>"The sine for 1.00000 is 0.841471".
<DIV></DIV>>Then I tried to calculate sine for 1.0000 on a
<DIV></DIV>>calculator and I found that sine for 1 is 0.017452...
<DIV></DIV>>
<DIV></DIV>>What am I doing wrong?
<DIV></DIV>>(I'm sorry for the spelling mistakes)
<DIV></DIV>>
<DIV></DIV>>__________________________________________________
<DIV></DIV>>Do You Yahoo!?
<DIV></DIV>>Find a job, post your resume.
<DIV></DIV>>http://careers.yahoo.com
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>Dev-cpp-users mailing list
<DIV></DIV>>Dev...@li...
<DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
<DIV></DIV></div><br clear=all><hr>Get your FREE download of MSN Explorer at <a href='http://go.msn.com/bql/hmtag_itl_EN.asp'>http://explorer.msn.com</a><br></html>
|