NaN is not propagated in `tf.pow(tf.constant(1.0), tf.sqrt(tf.constant(-1.0)))`
@hujiajie,
Thank you for reporting the issue. Have you got the chance to have a look at this open issue https://github.com/tensorflow/tensorflow/issues/57747 https://github.com/tensorflow/tensorflow/issues/57757 where a similar issue has been reported and it is still open.
 Also I request to follow the similar feature which has been proposed to have the updates on the similar issue. Thank you! I can follow on #57757, thanks!
 Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60366">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60366">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

No

### Source

binary

### Tensorflow Version

2.12.0

### Custom Code

Yes

### OS Platform and Distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

Currently `tf.pow(x, y)` returns 1.0 (at least on CPU) when `x` is 1.0 and `y` is NaN, instead of propagating NaN like most other math ops. Can someone confirm which is the intended behavior? Thanks


### Standalone code to reproduce the issue

```shell
import tensorflow as tf

x = tf.constant(1.0)
y = tf.sqrt(tf.constant(-1.0))
z = tf.pow(x, y)
print(z)
```


### Relevant log output

_No response_</details>