update equations in C
comments and renaming variables