Given a float, I want to format it to display only the first 4 decimal places. (For example, given 12.345678 => I need 12.3456)
However, I'd like to do it in optimal complexity, so I'm aiming to avoid converting the float to string.
Is there any way to achieve this?