Hi, could someone explain what is happening here, this is printing "1 0".
I don't know how format!() rounds but I was expecting it to round it to 1 as round() does.
Thanks

It doesn't round. You 're just displaying your double with a precision of zero digits after the decimal point. The double is still 0.5, so without the fraction you get 0.