### 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::sqrt((T)1.0) == doctest::Approx((T)1.0));
	CHECK(Math::sqrt((T)1.5) == doctest::Approx((T)1.224745));
}
TEST_CASE_TEMPLATE("[Math] is_nan/is_inf", T, float, double) {
	CHECK(!Math::is_nan((T)0.0));
	CHECK(Math::is_nan((T)NAN));
	CHECK(!Math::is_inf((T)0.0));
	CHECK(Math::is_inf((T)INFINITY));
}
TEST_CASE_TEMPLATE("[Math] linear_to_db", T, float, double) {
	CHECK(Math::linear_to_db((T)1.0) == doctest::Approx((T)0.0));
	CHECK(Math::linear_to_db((T)20.0) == doctest::Approx((T)26.0206));
	CHECK(Math::is_inf(Math::linear_to_db((T)0.0)));
	CHECK(Math::is_nan(Math::linear_to_db((T)-20.0)));
}
TEST_CASE_TEMPLATE("[Math] db_to_linear", T, float, double) {
	CHECK(Math::db_to_linear((T)0.0) == doctest::Approx((T)1.0));
	CHECK(Math::db_to_linear((T)1.0) == doctest::Approx((T)1.122018));
	CHECK(Math::db_to_linear((T)20.0) == doctest::Approx((T)10.0));
	CHECK(Math::db_to_linear((T)-20.0) == doctest::Approx((T)0.1));
}
TEST_CASE_TEMPLATE("[Math] step_decimals", T, float, double) {
	CHECK(Math::step_decimals((T)-0.5) == 1);
	CHECK(Math::step_decimals((T)0) == 0);
	CHECK(Math::step_decimals((T)1) == 0);
	CHECK(Math::step_decimals((T)0.1) == 1);
	CHECK(Math::step_decimals((T)0.01) == 2);
	CHECK(Math::step_decimals((T)0.001) == 3);
	CHECK(Math::step_decimals((T)0.0001) == 4);
	CHECK(Math::step_decimals((T)0.00001) == 5);