/*- Author: Brian Tiffin Dedicated to the public domain Date started: November, 2016 Modified: 2016-12-14/11:54-0500 Tectonics: javac tightloopjava.java java -cp . tightloopjava +*/ /* Sum of values from 0 to 16777216 */ public class tightloopjava { public static void main(String[] args) { long total = 0; for (int n = 0; n <= Math.pow(2, 24); n++) { total += n; } System.out.println(total); } }