double sanity checks (inf/nan)