tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

6 lignes · 154 octetsBrut · Historique
1# Float arithmetic in a loop: a running sum, three million times.
2x, acc = 0.0, 0.0
3for _ in range(3_000_001):
4 acc += x * 2.0
5 x += 0.5
6print(acc)