By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,345 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,345 IT Pros & Developers. It's quick & easy.

sin and cos in c

P: 9
hello,
i'm currently in a calc class and the most recent assigned homework requires a bunch of calculations that are very basic yet very repetitive. I'm wanting to write a program in c to perform these calculations using a few nested loops, the only problem is that some of them require sin and cos, which i'm not familiar with in c... are these in any way incorporated into the math.h library? thanks for any help!
Nov 9 '06 #1
Share this Question
Share on Google+
3 Replies


sicarie
Expert Mod 2.5K+
P: 4,677
hello,
i'm currently in a calc class and the most recent assigned homework requires a bunch of calculations that are very basic yet very repetitive. I'm wanting to write a program in c to perform these calculations using a few nested loops, the only problem is that some of them require sin and cos, which i'm not familiar with in c... are these in any way incorporated into the math.h library? thanks for any help!
Yes, they are, here's a reference to the C math.h, I don't know if/how it differs from the C++ math.h, though I'm sure both are in there.

http://www.utas.edu.au/infosys/info/...C/CStdLib.html

(Though it might take you longer to code these calculations than to actually make them, considering you will have to punch each of the problems in to get the output...)
Nov 9 '06 #2

Expert 100+
P: 1,510
do you mean you have to evaluate the Taylor series for the sine and cosine functions or just have some equations that will use sin() and cos() from <math.h>, e.g.
http://www.cplusplus.com/ref/cmath/sin.html
Nov 9 '06 #3

momotaro
100+
P: 357
use the <math.h> the sin and the cos are there!!
Nov 9 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.