package main import ( \"fmt\" \"strconv\" ) func main() { k := 10/3.0 i := fmt.Sprintf(\"%.2f\", k) f,_ := strconv.ParseFloat(i, 2) fmt.Pri
func FloatPrecision(num float64, precision int) float64 { p := math.Pow10(precision) value := float64(int(num*p)) / p return value }