J'essaie d'obtenir 2,4/0,8 == 3 GoGo division nombre flottant
w:=float64(2.4)
fmt.Println(math.Floor(w/0.8),math.Floor(2.4/0.8))
Il me donne "2 3".
La question est pourquoi math.Floor(w/0.8)
ne me donnera pas 3. Est-ce la limite de précision du nombre de flotteur?
bien, je dois pousser à me donner 3, donc je fait: 'const NUDGE = 1E-10' et' Math.floor (w/0,8 + NUDGE) ' –