### 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
#ifndef TEST_MATH_FUNCS_H
#define TEST_MATH_FUNCS_H
#include "tests/test_macros.h"
namespace TestMath {
TEST_CASE("[Math] C++ macros") {
	CHECK(MIN(-2, 2) == -2);
	CHECK(MIN(600, 2) == 2);
	CHECK(MAX(-2, 2) == 2);
	CHECK(MAX(600, 2) == 600);
	CHECK(CLAMP(600, -2, 2) == 2);
	CHECK(CLAMP(620, 600, 650) == 620);
	
	CHECK(CLAMP(620, 600, 50) == 50);
	CHECK(ABS(-5) == 5);
	CHECK(ABS(0) == 0);
	CHECK(ABS(5) == 5);
	CHECK(SIGN(-5) == -1.0);