fixed a sin/cos problem on gauss approx