libc function code
add gradient descent