See the last three examples listed below.
From: Serial.print() - Arduino Reference
For floating point numbers, this parameter specifies the number of decimal places to use. For example:
?Serial.print(78, BYTE) gives "N"
?Serial.print(78, BIN) gives "1001110"
?Serial.print(78, OCT) gives "116"
?Serial.print(78, DEC) gives "78"
?Serial.print(78, HEX) gives "4E"
?Serial.println(1.23456, 0) gives "1"
?Serial.println(1.23456, 2) gives "1.23"
?Serial.println(1.23456, 4) gives "1.2346"