### 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::asin((T)-2.0) == doctest::Approx((T)-1.5707963268));
	CHECK(Math::acos((T)-0.1) == doctest::Approx((T)1.670963748));
	CHECK(Math::acos((T)0.1) == doctest::Approx((T)1.4706289056));
	CHECK(Math::acos((T)0.5) == doctest::Approx((T)1.0471975512));
	CHECK(Math::acos((T)1.0) == doctest::Approx((T)0.0));
	CHECK(Math::acos((T)2.0) == doctest::Approx((T)0.0));
	CHECK(Math::acos((T)-2.0) == doctest::Approx((T)Math_PI));
	CHECK(Math::atan((T)-0.1) == doctest::Approx((T)-0.0996686525));
	CHECK(Math::atan((T)0.1) == doctest::Approx((T)0.0996686525));
	CHECK(Math::atan((T)0.5) == doctest::Approx((T)0.463647609));
	CHECK(Math::atan((T)1.0) == doctest::Approx((T)0.7853981634));
	CHECK(Math::atan((T)1.5) == doctest::Approx((T)0.9827937232));
	CHECK(Math::atan((T)450.0) == doctest::Approx((T)1.5685741082));
}
TEST_CASE_TEMPLATE("[Math] asinh/acosh/atanh", T, float, double) {
	CHECK(Math::asinh((T)-2.0) == doctest::Approx((T)-1.4436354751));
	CHECK(Math::asinh((T)-0.1) == doctest::Approx((T)-0.0998340788));
	CHECK(Math::asinh((T)0.1) == doctest::Approx((T)0.0998340788));
	CHECK(Math::asinh((T)0.5) == doctest::Approx((T)0.4812118250));
	CHECK(Math::asinh((T)1.0) == doctest::Approx((T)0.8813735870));
	CHECK(Math::asinh((T)2.0) == doctest::Approx((T)1.4436354751));
	CHECK(Math::acosh((T)-2.0) == doctest::Approx((T)0.0));
	CHECK(Math::acosh((T)-0.1) == doctest::Approx((T)0.0));
	CHECK(Math::acosh((T)0.1) == doctest::Approx((T)0.0));
	CHECK(Math::acosh((T)0.5) == doctest::Approx((T)0.0));
	CHECK(Math::acosh((T)1.0) == doctest::Approx((T)0.0));
	CHECK(Math::acosh((T)2.0) == doctest::Approx((T)1.3169578969));
	CHECK(Math::acosh((T)450.0) == doctest::Approx((T)6.8023935287));
	CHECK(Math::is_inf(Math::atanh((T)-2.0)));
	CHECK(Math::atanh((T)-2.0) < (T)0.0);