| 72 | static DoubleUnaryOperator wrappedFirst = getFirstWrapped(f, 0.1); |
| 73 | |
| 74 | private static void directCalc(boolean report) { |
| 75 | System.gc(); |
| 76 | double result = 0; |
| 77 | double h = 0.1; |
| 78 | long t0 = System.currentTimeMillis(); |
| 79 | for (int i = 1; i < 1000000; i++) { |
| 80 | result += (math(i + h) - math(i - h)) / h / 2; |
| 81 | } |
| 82 | if (report) |
| 83 | System.out.println("Direct: ..........."+ result + "........" + (System.currentTimeMillis() - t0)); |
| 84 | |
| 85 | } |
| 86 | |
| 87 | private static void unwrappedFI(DoubleUnaryOperator f, boolean report) { |
| 88 | System.gc(); |