factorizing float/double trig reductions