The values are:
FullSizePos - rb.position.x = -0.3849745
spring Strength: 1.3
If springStreangth is 1, then it will not give NaN.
When putting these values in a calculator, it gives me a correct value:
(-0.3849745^1.3)

Unity’s documentation on the math methods is very basic but the C# one for Math.Pow has a nice table showing the return values you can expect.

The relevant line is:

x

y

Return value

< 0 but not NegativeInfinity

Finite non-integer

NaN

i.e. a negative base with a non-integer exponent will return NaN. This is specified in a standard for floating point arithmetic, so this will be mostly the same across programming languages.

I suspect what you entered in the calculator is effectively -(0.3849745^1.3) (i.e. take pow with a positive base and then negate it), instead of (-0.3849745)^1.3. The ^ operation has precedence over the -, so you need to put brackets around the base value.

(-0.3849745)^1.3 either gives NaN or, if your calculator supports it, a complex number. This operation is not defined for real numbers, only complex ones. Basic math in programming is usually just for real numbers, so returning NaN is the expected outcome.