2 ms·
I have the feeling that a naive polynomial approximation would give lower relative error than a naive Taylor series approximation—at least for the same number o
by evincarofautumn 15y ago
I have the feeling that a naive polynomial approximation would give lower relative error than a naive Taylor series approximation—at least for the same number of clock cycles. Or am I just crazy?
float sin(float const x) {
float const y = (4 / pi) * x + (-4 / (pi * pi)) * x * abs(x);
return y + 0.218 * (y * abs(y) - y);
}