Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
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
1
Funciones: MandelBrot
Herout (67) - 6
ejemplos bucles basicos
Cviceni 7 1 uloha ++upper,isupper
lab7
cv3
Příklad 3 min max #define
POLE[radky][sloupce]
Bucles: Múltiplos de 4 hasta N tecleado por el usuario
mallocpole