Some math formulas done in C