A bug in tf.maximum
@sachinprasadhs,
I was able to reproduce the issue on tensorflow v2.14, v2.15 and [tf-nightly](https://colab.research.google.com/gist/tilakrayal/710cc9dd4fe87370b15de2bc7c038996/untitled1588.ipynb). Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/8a70b90740d8d2382c90ac81f3b0f9dc/untitled1587.ipynb). Hi, 

For the first instance, the casting is performed by default internally which casts both the inputs based on the first input `dtype`, which is `float`.
In second case, this can nlt be performed since `epsilon` value can not be converted to `int`. 
You need to perform the explicit `tf.cast` to a desired `dtype` to continue with the operation.  This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. 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/62584">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/62584">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf 2.14.0

### Custom code

Yes

### OS platform and distribution

windows colab

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

According to [tf.maximum doc](https://www.tensorflow.org/api_docs/python/tf/math/maximum), the two inputs of `tf.maximum` must have the same type. In following code, when first input is float type, second input is int type, `tf.maximum` outputs a tensor. While when first input is int type, second input is float type, `tf.maximum` throws error. IMO, If `tf.maximum(epsilon, x)` is working I think `tf.maximum(x, epsilon)` should also work and generate same output. Actually, I have a model crash when training due to this small difference.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
x=5
epsilon = 1e-12
print(tf.maximum(epsilon, x))
print(tf.maximum(x, epsilon))
```


### Relevant log output

```shell
tf.Tensor(5.0, shape=(), dtype=float32)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-4-095832aa68e6> in <cell line: 5>()
      3 epsilon = 1e-12
      4 print(tf.maximum(epsilon, x))
----> 5 print(tf.maximum(x, epsilon))
      6 
      7 #tf.Tensor(5.0, shape=(), dtype=float32)

/usr/local/lib/python3.10/dist-packages/tensorflow/python/ops/gen_math_ops.py in maximum(x, y, name)
   6339   if tld.is_eager:
   6340     try:
-> 6341       _result = pywrap_tfe.TFE_Py_FastPathExecute(
   6342         _ctx, "Maximum", name, x, y)
   6343       return _result

TypeError: Cannot convert 1e-12 to EagerTensor of dtype int32
```
