Skip to content

Instantly share code, notes, and snippets.

@Gerjo
Created November 10, 2013 16:13
Show Gist options
  • Save Gerjo/7400106 to your computer and use it in GitHub Desktop.
Save Gerjo/7400106 to your computer and use it in GitHub Desktop.
JavaScript float... fail.
var a = 33.3, b = 43.7;
var n = new Float32Array(2);
n[0] = a;
n[1] = b;
console.log(a / b, n[0] / n[1]);
// Console: 0.7620137299771166, 0.7620136992148795
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment