#include <stdio.h>
#include <math.h>
int main(void){
int kaijo3 = 1 * 2 * 3;
int kaijo5 = 1 * 2 * 3 * 4 * 5;
int kaijo7 = 1 * 2 * 3 * 4 * 5 * 6 * 7;
double x, diff;
for(x = 0.0; x <= M_PI; x += 0.05 * M_PI){
diff = sin(x) - (x - pow(x, 3) / kaijo3 + pow(x, 5) / kaijo5 - pow(x, 7) / kaijo7);
printf("x=%1.10lf diff=%1.10lf\n", x, diff);
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CgppbnQgbWFpbih2b2lkKXsKICBpbnQga2Fpam8zID0gMSAqIDIgKiAzOwogIGludCBrYWlqbzUgPSAxICogMiAqIDMgKiA0ICogNTsKICBpbnQga2Fpam83ID0gMSAqIDIgKiAzICogNCAqIDUgKiA2ICogNzsKICBkb3VibGUgeCwgZGlmZjsKCiAgZm9yKHggPSAwLjA7IHggPD0gTV9QSTsgeCArPSAwLjA1ICogTV9QSSl7CiAgICBkaWZmID0gc2luKHgpIC0gKHggLSBwb3coeCwgMykgLyBrYWlqbzMgKyBwb3coeCwgNSkgLyBrYWlqbzUgLSBwb3coeCwgNykgLyBrYWlqbzcpOwogICAgcHJpbnRmKCJ4PSUxLjEwbGYgZGlmZj0lMS4xMGxmXG4iLCB4LCBkaWZmKTsKICB9CgogIHJldHVybiAwOwp9Cg==