News for hackers. Stuff that matters.
Re:Implementing Advanced Math Functions by evincarofautumn on Wednesday April 25, 2012 @10:22AM (#3889208)
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);
    }

There are no comments on this comment yet.