add isnan to fix windows build