Skip to content

Instantly share code, notes, and snippets.

@pavelburov
Last active August 29, 2015 14:05
Show Gist options
  • Save pavelburov/cd9408046ef969e11b50 to your computer and use it in GitHub Desktop.
Save pavelburov/cd9408046ef969e11b50 to your computer and use it in GitHub Desktop.
Some data types surprises. You can test your answers in groovyConsole.
//----
(1000000 * 1000000) / 1000000 // = ???
//----
double nominal = 1.0
double sum = 0.0
10.times {
sum += 0.1
}
nominal == sum // ???
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment