Почему так?
package main
import (
"fmt"
"strconv"
)
func main() {
fmt.Println(strconv.FormatFloat(0.15, 'f', 1, 32)) // печатает 0.2
fmt.Println(strconv.FormatFloat(0.15, 'f', 1, 64)) // печатает 0.1
}
http://play.golang.org/p/MeAc6vXCnC
В документации написано, что
FormatFloat converts the floating-point number f to a string, according to the format fmt and precision prec. It rounds the result assuming that the original was obtained from a floating-point value of bitSize bits (32 for float32, 64 for float64).