magic_trig_func iterates through fewer numbers (more reliable) and has no unneccessary explicit returns