A c library for computing a PID