#include <stdio.h>
#include <math.h>
int main(void) {
double a = -1000.0, b = 1000.0;
int n = 100000000000000;
double h = (b - a) / n;
double Tm = 0.0;
for (int i = 1; i < n; i++) {
double x = a + i * h;
}
Tm *= h;
printf("ガウス積分の近似値: %.20f\n", Tm
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXRoLmg+CmludCBtYWluKHZvaWQpIHsKICAgIGRvdWJsZSBhID0gLTEwMDAuMCwgYiA9IDEwMDAuMDsgCiAgICBpbnQgbiA9IDEwMDAwMDAwMDAwMDAwMDsgCiAgICBkb3VibGUgaCA9IChiIC0gYSkgLyBuOyAgCiAgICBkb3VibGUgVG0gPSAwLjA7ICAKICAgIFRtICs9IGV4cCgtcG93KGEsIDIpKSAvIDI7ICAKICAgIGZvciAoaW50IGkgPSAxOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgZG91YmxlIHggPSBhICsgaSAqIGg7ICAKICAgICAgICBUbSArPSBleHAoLXBvdyh4LCAyKSk7ICAKICAgIH0KICAgIFRtICs9IGV4cCgtcG93KGIsIDIpKSAvIDI7IAogICAgVG0gKj0gaDsgIAogICAgcHJpbnRmKCLjgqzjgqbjgrnnqY3liIbjga7ov5HkvLzlgKQ6ICUuMjBmXG4iLCBUbSk7CiAgICByZXR1cm4gMDsKfQ==