Complited derivative.c
Improved derivative.c