### 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
TEST_CASE_TEMPLATE("[Math] abs", T, int, float, double) {
	CHECK(Math::abs((T)-1) == (T)1);
	CHECK(Math::abs((T)0) == (T)0);
	CHECK(Math::abs((T)1) == (T)1);
	CHECK(Math::abs((T)0.1) == (T)0.1);
}
TEST_CASE_TEMPLATE("[Math] round/floor/ceil", T, float, double) {
	CHECK(Math::round((T)1.5) == (T)2.0);
	CHECK(Math::round((T)1.6) == (T)2.0);
	CHECK(Math::round((T)-1.5) == (T)-2.0);
	CHECK(Math::round((T)-1.1) == (T)-1.0);
	CHECK(Math::floor((T)1.5) == (T)1.0);
	CHECK(Math::floor((T)-1.5) == (T)-2.0);
	CHECK(Math::ceil((T)1.5) == (T)2.0);
	CHECK(Math::ceil((T)-1.9) == (T)-1.0);
}
TEST_CASE_TEMPLATE("[Math] sin/cos/tan", T, float, double) {
	CHECK(Math::sin((T)-0.1) == doctest::Approx((T)-0.0998334166));
	CHECK(Math::sin((T)0.1) == doctest::Approx((T)0.0998334166));
	CHECK(Math::sin((T)0.5) == doctest::Approx((T)0.4794255386));
	CHECK(Math::sin((T)1.0) == doctest::Approx((T)0.8414709848));
	CHECK(Math::sin((T)1.5) == doctest::Approx((T)0.9974949866));
	CHECK(Math::sin((T)450.0) == doctest::Approx((T)-0.683283725));
	CHECK(Math::cos((T)-0.1) == doctest::Approx((T)0.99500416530));
	CHECK(Math::cos((T)0.1) == doctest::Approx((T)0.9950041653));
	CHECK(Math::cos((T)0.5) == doctest::Approx((T)0.8775825619));
	CHECK(Math::cos((T)1.0) == doctest::Approx((T)0.5403023059));
	CHECK(Math::cos((T)1.5) == doctest::Approx((T)0.0707372017));
	CHECK(Math::cos((T)450.0) == doctest::Approx((T)-0.7301529642));
	CHECK(Math::tan((T)-0.1) == doctest::Approx((T)-0.1003346721));