/*- Author: Brian Tiffin Dedicated to the public domain Date started: May 2017 Modified: 2017-05-12/22:21-0400 btiffin Tectonics: groovyc tightloop-groovy.groovy groovy TightloopGroovy or java -cp ".:/usr/share/groovy/lib/*" TightloopGroovy +*/ /* Sum of value from 0 to 16777216 */ public class TightloopGroovy { public static void main(String[] args) { long total = 0; for (int i = 0; i <= 1<<24; i++) { total += i } println(total) } }