### 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(SIGN(0) == 0.0);
	CHECK(SIGN(5) == 1.0);
}
TEST_CASE("[Math] Power of two functions") {
	CHECK(next_power_of_2(0) == 0);
	CHECK(next_power_of_2(1) == 1);
	CHECK(next_power_of_2(16) == 16);
	CHECK(next_power_of_2(17) == 32);
	CHECK(next_power_of_2(65535) == 65536);
	CHECK(previous_power_of_2(0) == 0);
	CHECK(previous_power_of_2(1) == 1);
	CHECK(previous_power_of_2(16) == 16);
	CHECK(previous_power_of_2(17) == 16);
	CHECK(previous_power_of_2(65535) == 32768);
	CHECK(closest_power_of_2(0) == 0);
	CHECK(closest_power_of_2(1) == 1);
	CHECK(closest_power_of_2(16) == 16);
	CHECK(closest_power_of_2(17) == 16);
	CHECK(closest_power_of_2(65535) == 65536);
	CHECK(get_shift_from_power_of_2(0) == -1);
	CHECK(get_shift_from_power_of_2(1) == 0);
	CHECK(get_shift_from_power_of_2(16) == 4);
	CHECK(get_shift_from_power_of_2(17) == -1);
	CHECK(get_shift_from_power_of_2(65535) == -1);
	CHECK(nearest_shift(0) == 0);
	CHECK(nearest_shift(1) == 1);
	CHECK(nearest_shift(16) == 5);
	CHECK(nearest_shift(17) == 5);
	CHECK(nearest_shift(65535) == 16);
}