changed to use if((boost::math::isinf)(x)) {
if(x < 0) return 0; return 1;
}
to get rid of 4127 warnings
but still need to supress 4127