func getPrec(num float64, better bool) int {
	max := 3
	eps := 0.0005
	if better {
		max = 6
		eps = 0.0000005
	}
	prec := 0
	for math.Mod(num, 1) > eps {
		num *= 10
		eps *= 10
		prec++
	}

	if max < prec {
		return max
	}
	return prec
}
func getPrec(num float64, better bool) int {
	max := 3
	eps := 0.0005
	if better {
		max = 6
		eps = 0.0000005
	}
	prec := 0
	for math.Mod(num, 1) > eps {
		num *= 10
		eps *= 10
		prec++
	}

	if max < prec {
		return max
	}
	return prec
}
// TODO needs test, since it is not quiet right