problems in fn

Sep 12, 2012 at 3:11pm
QUESTION: Write a C program to compute the Sine value of a given number X using the following series. Sin(x) = x - x3 / 3! + x5 / 5! - x7 / 7! + ……
Sep 12, 2012 at 3:16pm
Note that x1/1! = x, so this series is pretty easy to write as one repeatable step. Use a while loop or recursion.
Sep 12, 2012 at 3:59pm
To prevent the usual error when the number of factorials exceeds the acceptable range for a given type you can look the reference http://cpp.forum24.ru/?1-3-0-00000047-000-0-0-1347056992

Though it is written in Russia you can translate it with google or at least to see how many factorial numbers can fit into an object of type int.
Topic archived. No new replies allowed.