@@ -0,0 +1,2531 @@
+package org.apache.commons.math.util;%0A%0Aimport java.lang.reflect.Field;%0A%0A/*%0A * FastMath load test - requires that FastMath.USE_PRECOMPUTED_TABLES be set to non-final.%0A * %0ASample output from:%0Ajava -cp target/classes;target/test-classes org.apache.commons.math.util.FastMathLoadCheck false false%0Ajava -cp target/classes;target/test-classes org.apache.commons.math.util.FastMathLoadCheck false true%0Ajava -cp target/classes;target/test-classes org.apache.commons.math.util.FastMathLoadCheck true  false%0Ajava -cp target/classes;target/test-classes org.apache.commons.math.util.FastMathLoadCheck true  true%0A%0AUsing exp(100); compute=false%0Anew   12155456       9219       5308       5029       5587       5308       5029       5029       5029       5308%0AUsing exp(100); compute=true%0Anew   34929579       9499       5308       5308       5029       5029       5029       5308       5028       5029%0AUsing max(0,0); compute=false%0Anew       5029       3632       3073       3073       3073       3073       3073       3073       3073       3073%0AUsing max(0,0); compute=true%0Anew       5028       3911       3073       3073       3073       3073       3073       3073       3073       3073%0A%0A */%0Apublic class FastMathLoadCheck %7B%0A%0A    private static int LOOPS = 10;%0A    private static boolean MAX = false;%0A    private static boolean compute = false;%0A%0A    public static void main(String%5B%5D args) throws Exception %7B%0A        if (args.length%3E0) MAX = Boolean.valueOf(args%5B0%5D);%0A        if (args.length%3E1) compute = Boolean.valueOf(args%5B1%5D);%0A        if (args.length%3E2) LOOPS = Integer.valueOf(args%5B2%5D);%0A        p(%22Using %22+ (MAX ? %22max(0,0)%22 : %22exp(100)%22) + %22; compute=%22 + compute+%22%5Cn%22);%0A        Field usePrecompute = FastMath.class.getDeclaredField(%22USE_PRECOMPUTED_TABLES%22);%0A        usePrecompute.setAccessible(true);%0A        if (usePrecompute.getBoolean(null) != compute) %7B%0A            usePrecompute.setBoolean(null, compute);%0A        %7D%0A        usePrecompute.setAccessible(false);%0A        test();%0A    %7D%0A    private static void test()%7B%0A        p(%22new%22);%0A        for(int i=0; i%3C LOOPS; i++)%7B%0A            p(%22 %22);%0A            long t1 = System.nanoTime();%0A            if (MAX) %7B%0A                FastMath.max(0,0);%0A            %7D else %7B%0A                FastMath.exp(100);%0A            %7D%0A            long t2 = System.nanoTime();%0A            p(%22%2510d%22,t2-t1);%0A        %7D%0A        p(%22%5Cn%22);%0A    %7D%0A%0A    private static void p(String format, Object p)%7B%0A        System.out.printf(format, p);%0A    %7D%0A    private static void p(Object p)%7B%0A        System.out.print(p);%0A    %7D%0A%7D%0A

Use reflection to change the compute setting. This allows the code to compile even though the field is private.