im writing a calculator programme for my project. But i dont know how to find Tan, Cos, Sin. Any one can help I would appreciate that. what is the formula

9 Years
Discussion Span
Last Post by csurfer

Or do you have to write all of the functions? Which I'm sure Wikipedia usually has some good function descriptions you can follow.


yeah i want to write the whole programme. I already have 9 different functions already, just want tan, cos, sin. i include math.h header file already


Well when all the functions have been already given in math.h why do you want to re-write them ? You can just take the input in degrees from the user and convert it into radians and feed into functions.

Well if you want to know the basics more and write your own sine cosine programs then here you go:

sin x = x - x^3/3! + x^5/5!......
cos x = 1 - x^2/2! + x^4/4!.......
tan x = sin x / cos x

where x is in radians...
convert above equations into program and you are done...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.