### 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::tan((T)0.1) == doctest::Approx((T)0.1003346721));
	CHECK(Math::tan((T)0.5) == doctest::Approx((T)0.5463024898));
	CHECK(Math::tan((T)1.0) == doctest::Approx((T)1.5574077247));
	CHECK(Math::tan((T)1.5) == doctest::Approx((T)14.1014199472));
	CHECK(Math::tan((T)450.0) == doctest::Approx((T)0.9358090134));
}
TEST_CASE_TEMPLATE("[Math] sinh/cosh/tanh", T, float, double) {
	CHECK(Math::sinh((T)-0.1) == doctest::Approx((T)-0.10016675));
	CHECK(Math::sinh((T)0.1) == doctest::Approx((T)0.10016675));
	CHECK(Math::sinh((T)0.5) == doctest::Approx((T)0.5210953055));
	CHECK(Math::sinh((T)1.0) == doctest::Approx((T)1.1752011936));
	CHECK(Math::sinh((T)1.5) == doctest::Approx((T)2.1292794551));
	CHECK(Math::cosh((T)-0.1) == doctest::Approx((T)1.0050041681));
	CHECK(Math::cosh((T)0.1) == doctest::Approx((T)1.0050041681));
	CHECK(Math::cosh((T)0.5) == doctest::Approx((T)1.1276259652));
	CHECK(Math::cosh((T)1.0) == doctest::Approx((T)1.5430806348));
	CHECK(Math::cosh((T)1.5) == doctest::Approx((T)2.3524096152));
	CHECK(Math::tanh((T)-0.1) == doctest::Approx((T)-0.0996679946));
	CHECK(Math::tanh((T)0.1) == doctest::Approx((T)0.0996679946));
	CHECK(Math::tanh((T)0.5) == doctest::Approx((T)0.4621171573));
	CHECK(Math::tanh((T)1.0) == doctest::Approx((T)0.761594156));
	CHECK(Math::tanh((T)1.5) == doctest::Approx((T)0.9051482536));
	CHECK(Math::tanh((T)450.0) == doctest::Approx((T)1.0));
}
TEST_CASE_TEMPLATE("[Math] asin/acos/atan", T, float, double) {
	CHECK(Math::asin((T)-0.1) == doctest::Approx((T)-0.1001674212));
	CHECK(Math::asin((T)0.1) == doctest::Approx((T)0.1001674212));
	CHECK(Math::asin((T)0.5) == doctest::Approx((T)0.5235987756));
	CHECK(Math::asin((T)1.0) == doctest::Approx((T)1.5707963268));
	CHECK(Math::asin((T)2.0) == doctest::Approx((T)1.5707963268));