mathematic calculation base on C