juanPabloMiceli 7fb48b9a2f
Fix negative precision round with ints (issue #9049) (#9073)
# Description
Before this PR, `math round` ignores the input if it's an `int`. This
results in the following behaviour:
```
> 123 | math round --precision -1
123
```
When the correct result is 120.

Now `int values` are converted to `float values` before actually
rounding up the number in order to take advantage of the float
implementation.

Fixes #9049.
2023-05-03 23:07:32 +02:00
..
2022-11-22 16:58:11 -08:00
2023-03-15 18:54:55 +13:00
2023-03-15 18:54:55 +13:00
2023-01-22 19:49:40 +01:00
2023-03-15 18:54:55 +13:00
2023-04-15 17:11:02 +12:00
2022-12-22 00:33:26 +02:00
2022-09-11 11:48:27 +03:00
2023-03-15 18:54:55 +13:00
2023-03-15 18:54:55 +13:00
2023-04-28 13:25:44 +02:00
2022-02-07 14:54:06 -05:00
2023-03-15 18:54:55 +13:00
2023-03-15 18:54:55 +13:00
2023-03-15 18:54:55 +13:00
2023-04-28 13:25:44 +02:00
2023-03-15 18:54:55 +13:00
2023-03-18 08:58:13 +13:00
2023-03-15 18:54:55 +13:00
2022-09-11 11:48:27 +03:00
2023-03-28 12:40:29 -07:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-03-15 18:54:55 +13:00
2023-04-28 13:25:44 +02:00
2023-03-17 11:53:46 +13:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-04-28 13:25:44 +02:00
2023-02-27 20:44:05 +13:00
2023-03-17 11:53:46 +13:00
2023-03-15 18:54:55 +13:00