Changed MADmark source code so that it can correctly handle NAN and
Infinity inside an array