I chose the double type, because it is the return type of sqrt(). Truncating to float precision afterwards is easy, but if you assign it to a double variable, you lose precision for no reason. I assume you suggest it to avoid the casting (i.e. better usability)?