Most of the time when someone asks how to round a float to a certain number of digits, the classic answer given is to use FORMAT :
(format nil "~,2F" 6.376)
==> "6.38"
However, in a particular case, the rounding using FORMAT is implementation dependant !
In CLHS - 22.3.3.1 Tilde F: Fixed-Format Floating-Point :
When rounding up and rounding down would produce printed values equidistant from the scaled value of arg, then the implementation is free to use either one. For example, printing the argument 6.375 using the format ~4,2F may correctly produce either 6.37 or 6.38.
Moreover, ffloor does not seem to me to allow rounding to several digits after the decimal point.
So my question is : How do you explicitly round the number 6.375 to 6.37 in a portable way ?