Trig solver improvements