### Godot version

4.1.rc3

### System information

Linux 5.10.181-2-MANJARO

### Issue description

`sign(NAN)` and `signf(NAN)` both return `1`. But this doesn't seem right, as `NAN > 0` is false (as all other `NAN` comparison are). These should really return `NAN` not `1`.

### Steps to reproduce

run 
```gdscript
print(sign(NAN), " ", signf(NAN))
```
output is: 
`1 1`

### Minimal reproduction project

N/A
CHECK(Math::step_decimals((T)0.000001) == 6);
	CHECK(Math::step_decimals((T)0.0000001) == 7);
	CHECK(Math::step_decimals((T)0.00000001) == 8);
	CHECK(Math::step_decimals((T)0.000000001) == 9);
	
	CHECK(Math::step_decimals((T)0.0000000001) == 0);
}
TEST_CASE_TEMPLATE("[Math] range_step_decimals", T, float, double) {
	CHECK(Math::range_step_decimals((T)0.000000001) == 9);
	
	CHECK(Math::range_step_decimals((T)0.0000000001) == 0);
	
	CHECK(Math::range_step_decimals((T)0.0) == 16);
	CHECK(Math::range_step_decimals((T)-0.5) == 16);
}
TEST_CASE_TEMPLATE("[Math] lerp", T, float, double) {
	CHECK(Math::lerp((T)2.0, (T)5.0, (T)-0.1) == doctest::Approx((T)1.7));
	CHECK(Math::lerp((T)2.0, (T)5.0, (T)0.0) == doctest::Approx((T)2.0));
	CHECK(Math::lerp((T)2.0, (T)5.0, (T)0.1) == doctest::Approx((T)2.3));
	CHECK(Math::lerp((T)2.0, (T)5.0, (T)1.0) == doctest::Approx((T)5.0));
	CHECK(Math::lerp((T)2.0, (T)5.0, (T)2.0) == doctest::Approx((T)8.0));
	CHECK(Math::lerp((T)-2.0, (T)-5.0, (T)-0.1) == doctest::Approx((T)-1.7));
	CHECK(Math::lerp((T)-2.0, (T)-5.0, (T)0.0) == doctest::Approx((T)-2.0));
	CHECK(Math::lerp((T)-2.0, (T)-5.0, (T)0.1) == doctest::Approx((T)-2.3));
	CHECK(Math::lerp((T)-2.0, (T)-5.0, (T)1.0) == doctest::Approx((T)-5.0));
	CHECK(Math::lerp((T)-2.0, (T)-5.0, (T)2.0) == doctest::Approx((T)-8.0));
}
TEST_CASE_TEMPLATE("[Math] inverse_lerp", T, float, double) {
	CHECK(Math::inverse_lerp((T)2.0, (T)5.0, (T)1.7) == doctest::Approx((T)-0.1));
	CHECK(Math::inverse_lerp((T)2.0, (T)5.0, (T)2.0) == doctest::Approx((T)0.0));