c implementation of sine