Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Sin(x) in C Teylor
#include <stdio.h> #include <math.h> #include <float.h> float teylor (float x) { float a = x; float s = 0.f; float n = 1.f; while (fabs(a) >= 1E-37f ) { s += a; n += 1.f; a = -a*x*x/((2.f*n-2.f)*(2.f*n-1.f)); } return s; } int main() { for (float i = 0.f; i <= 360.f; i += 1.f) printf("%.5f %.5f\n", i, teylor(i*M_PI/180.f)); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Funciones: MandelBrot
Herout (67) - 4
Max number of a vector
Vzdalenost makro
Herout (67) - 13
VKI_Mihalyk_3_2
Bucles: Triangulo asteriscos izquierdo
Bucles: Rombo asimetrico
Punteros: creación espacio para un int
Herout (67) - 15
Please log in to post a comment.