Looks like %f always truncates instead of rounding to the desired precision. For example, this: use std; fn main() { let f = 5.1; std::io::println(#fmt("hello world %f!", f)); } prints out "hello world 5.099999!" instead of the expected "hello world 5.100000!".