Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double cfrac_tan(double x, unsigned int n)
- {
- double vysledok = 0.0;
- double citatel = x*x;
- int cislo = (2*n)-1;
- while (cislo > 1)
- {
- vysledok = citatel/(cislo - vysledok);
- cislo -= 2;
- }
- if (cislo == 1)
- {
- vysledok = x/(1 - vysledok);
- }
- printf("%e\n",vysledok);
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement