Describe the bug
The trunc function with a precision argument incorrectly uses rounding semantics instead of truncation.
When calling [trunc(value, precision)] where precision > 0, the function uses f64::round() internally instead of f64::trunc(), causing values to be rounded to the nearest digit rather than truncated towards zero.
To Reproduce
Expected behavior
Should be truncated towards zero instead of rounds to nearest.
Additional context
No response
Describe the bug
The trunc function with a precision argument incorrectly uses rounding semantics instead of truncation.
When calling [trunc(value, precision)] where
precision > 0, the function usesf64::round()internally instead off64::trunc(), causing values to be rounded to the nearest digit rather than truncated towards zero.To Reproduce
Expected behavior
Should be truncated towards zero instead of rounds to nearest.
Additional context
No response