BUG: Fix bug in to_datetime that occasionally throws FloatingPointErr…
…or when called on a float array with missing values

- [ ] closes #58419
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.

The cause of the error is a numpy array created via np.empty(). Sometimes it contains garbage values which subsequently get passed to `np.round` causing errors.
Thanks @snitish  Pandas v.2.2.3, the bug is still there. I am processing a pd.Series filled with float timestamps. Overflows while `to_datetime` conversion with following `dt.round` to `ms`:
` time = pd.to_datetime(time, unit='ms', errors='coerce').dt.round(freq='ms')`
The error is related to `pd.to_datetime`, you can see below.

More details:
File "../pandas/core/tools/datetimes.py", line 1067, in to_datetime
values = convert_listlike(arg._values, format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "../pandas/core/tools/datetimes.py", line 407, in _convert_listlike_datetimes
return _to_datetime_with_unit(arg, unit, name, utc, errors)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "../pandas/core/tools/datetimes.py", line 512, in _to_datetime_with_unit
arr = cast_from_unit_vectorized(arg, unit=unit)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "conversion.pyx", line 149, in pandas._libs.tslibs.conversion.cast_from_unit_vectorized
File "../numpy/_core/fromnumeric.py", line 3710, in round
return _wrapfunc(a, 'round', decimals=decimals, out=out)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "../numpy/_core/fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
^^^^^^^^^^^^^^^^^^^^
FloatingPointError: overflow encountered in multiply @vgolskiy yes, the fix will be released with 3.0 (unless this gets backported to the 2.3.x branch) What workaround is recommended until pandas 3 is released? @RyuuOujiXS you can call `to_datetime()` after dropping `NaN`s, then add back the `NaN`s in the right places.
 @snitish , so it was the NaN value that was causing overflow? Also, after removing NaNs, it is better to return NaTs as the data will have a `datetime` type by that moment.
@RyuuOujiXS I described the workaround in the last comment here https://github.com/pandas-dev/pandas/issues/58419#issuecomment-2773359135