made trigonometric use C code