tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

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

4 lignes · 183 octetsBrut · Historique
1// Float arithmetic in a loop: a running sum, three million times.
2let x = 0, acc = 0;
3for (let i = 0; i <= 3_000_000; i++) { acc += x * 2.0; x += 0.5; }
4console.log(acc.toFixed(1));