added fallback isfinite if not found