### 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
T aux = x;
	x = y;
	y = aux;
}
#endif 
static _FORCE_INLINE_ unsigned int next_power_of_2(unsigned int x) {
	if (x == 0) {
		return 0;
	}
	--x;
	x |= x >> 1;
	x |= x >> 2;
	x |= x >> 4;
	x |= x >> 8;
	x |= x >> 16;
	return ++x;
}
static _FORCE_INLINE_ unsigned int previous_power_of_2(unsigned int x) {
	x |= x >> 1;
	x |= x >> 2;
	x |= x >> 4;
	x |= x >> 8;
	x |= x >> 16;
	return x - (x >> 1);
}
static _FORCE_INLINE_ unsigned int closest_power_of_2(unsigned int x) {