My mistake then. I did not intend to try and be so precise. I was thinking loosely. I have a very simple autodiff tool hand rolled (in Python) here to play with. I raise 0 to a negative exponent in the gradient of the cube root at 0. I do not get a NAN. Strictly speaking I get this:
"ZeroDivisionError: 0.0 cannot be raised to a negative power"
Is that satisfying? I do not claim anything more specific here. Sorry to be imprecise.
The problem is really that there are a lot of ways the function can have infinite slope. The sqrt function also has infinite slope at 0.
Dividing by zero isn't where the NaN comes from.