C utilities and optimization algorithms