#include <math.h>

double dsin (double x) {
    double sum = 0.0, t = x;
    int n = 0;

    while (t >= 1E-6 || t <= -1E-6) {
        sum = sum + t;
        n = n + 1;
        t = -t * x * x / (2*n) / (2*n + 1);
    }

    return sum;
}






