I am solving a nonlinear problem. I need to use some exponential term in my energy function but I see that whenever the power is not an integer it immediately creates nan and diverge. For example:

C **1. → works

C 1.0000001-> doesn’t work with:
Newton iteration 1: r (abs) = -nan (tol = 1.000e-06) r (rel) = -nan (tol = 1.000e-06)

Highly nonlinear problems are difficult and require a lot of care and “coaxing” to get a reasonable approximation of a solution. Assuming your residual and Jacobian are well formed with no singularities, consider these tips and tricks.

Thanks for your advice. But if you see my question it has nothing to do with those guidlines.
As I mentioned the problem works with power=1. but doesn’t work with power=1.0000001