tf.math.reduce_std on ragged tensors doesn't work properly
@sushreebarsa 
I was able to reproduce the issue on colab using TF v2.11. please find the gist [here](https://colab.research.google.com/gist/tiruk007/caeaad719fbe8e97bf1a307ca73845de/untitled144.ipynb) for reference .

Thank you ! I observe the same behavior in `float32` and `float64` in Tensorflow, Could you please let me know what exact values you are referring to and what is the expected values in your case. Thanks! 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/59830">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/59830">No</a>

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

Bug

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

Yes

### Source

source

### Tensorflow Version

tf 2.9

### 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?

```shell
Currently, no segment_std operation exists in tensorflow. Thus, I am implementing the function by myself in python using built-in tf methods. std_r=tf.math.reduce_std(...) is a fast and optimized way to achieve that (see the code). Unfortunately, std_r defers from np.std on the segments if the data is in tf.float32 format. The issue does not happen with tf.float64. When I convert the ragged segments segments_r into a tensor, which is only possible if all segments have the same length), reduce_std works fine
```


### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import numpy as np

def _segment_std(data, segment_ids, name=None):
    row_splits = tf.ragged.segment_ids_to_row_splits(segment_ids)
    segments_r = tf.RaggedTensor.from_row_splits(data, row_splits)
    std_r = tf.math.reduce_std(segments_r, axis=1)
    
    segments_t = segments_r.to_tensor()
    std_r_map = tf.map_fn(lambda x: tf.math.reduce_std(x, axis=0), segments_r)
    std_t = tf.math.reduce_std(segments_t, axis=1)
    for b in range(segments_r.shape[0]):
            print("=======", b, "=======")
            print(std_r[b])
            print(std_r_map[b])
            print(std_t[b])
    
    print(data.dtype, row_splits.dtype, segments_r.dtype, segments_t.dtype, std_r.dtype, std_r_map.dtype, std_t.dtype)
    return segments_r, segments_t

data_32 = tf.random.uniform((18, 6), dtype=tf.float32)
data_64 = tf.cast(data_32, dtype=tf.float64)
segment_ids = tf.constant([0,0,0,1,1,1,2,2,2,3,3,3,4,4,4,5,5,5])

segments_r_32, segments_t_32 = _segment_std(data_32, segment_ids)
print("======= numpy =======")
print(np.std(segments_r_32.numpy(), axis=1))
print(np.std(segments_t_32.numpy(), axis=1))

segments_r_64, segments_t_64 = _segment_std(data_64, segment_ids)
print("======= numpy =======")
print(np.std(segments_r_64.numpy(), axis=1))
print(np.std(segments_t_64.numpy(), axis=1))
```


### Relevant log output

```shell
======= 0 =======
tf.Tensor([0.15954268 0.14723612 0.3377797  0.22492617 0.22479114 0.04101199], shape=(6,), dtype=float32)
tf.Tensor([0.15954268 0.14723626 0.3377797  0.2249262  0.22479111 0.04101215], shape=(6,), dtype=float32)
tf.Tensor([0.15954268 0.14723626 0.3377797  0.2249262  0.22479111 0.04101215], shape=(6,), dtype=float32)
======= 1 =======
tf.Tensor([0.2185983  0.41067353 0.14908639 0.40719846 0.21105738 0.18947895], shape=(6,), dtype=float32)
tf.Tensor([0.21859837 0.4106735  0.14908642 0.40719846 0.2110574  0.18947898], shape=(6,), dtype=float32)
tf.Tensor([0.21859837 0.4106735  0.14908642 0.40719846 0.2110574  0.18947898], shape=(6,), dtype=float32)
======= 2 =======
tf.Tensor([0.05812957 0.31665203 0.2071376  0.3885405  0.09823482 0.27517167], shape=(6,), dtype=float32)
tf.Tensor([0.05812923 0.3166521  0.20713761 0.38854057 0.09823488 0.27517167], shape=(6,), dtype=float32)
tf.Tensor([0.05812923 0.3166521  0.20713761 0.38854057 0.09823488 0.27517167], shape=(6,), dtype=float32)
======= 3 =======
tf.Tensor([0.06295965 0.09678382 0.42397946 0.18043025 0.23579012 0.12517032], shape=(6,), dtype=float32)
tf.Tensor([0.06295984 0.09678387 0.42397946 0.18043028 0.23579012 0.12517034], shape=(6,), dtype=float32)
tf.Tensor([0.06295984 0.09678387 0.42397946 0.18043028 0.23579012 0.12517034], shape=(6,), dtype=float32)
======= 4 =======
tf.Tensor([0.01316889 0.16237932 0.28821537 0.11204658 0.17594427 0.34890616], shape=(6,), dtype=float32)
tf.Tensor([0.01316908 0.16237934 0.2882153  0.11204645 0.17594407 0.34890622], shape=(6,), dtype=float32)
tf.Tensor([0.01316908 0.16237934 0.2882153  0.11204645 0.17594407 0.34890622], shape=(6,), dtype=float32)
======= 5 =======
tf.Tensor([0.2691938  0.07409578 0.2120972  0.21070714 0.08790783 0.38431   ], shape=(6,), dtype=float32)
tf.Tensor([0.26919377 0.07409566 0.21209723 0.21070711 0.08790784 0.38431004], shape=(6,), dtype=float32)
tf.Tensor([0.26919377 0.07409566 0.21209723 0.21070711 0.08790784 0.38431004], shape=(6,), dtype=float32)
```
</details>