ExponentialDecayFunction { public double value(long numCall) { return a * FastMath.exp(-numCall * oneOverB); } ExponentialDecayFunction(double initValue,
                                    double valueAtNumCall,
                                    long numCall); double value(long numCall);  }
@Test public void testTrivial() { final int n = 65; final double init = 4; final double valueAtN = 3; final ExponentialDecayFunction f = new ExponentialDecayFunction(init, valueAtN, n); Assert.assertEquals(init, f.value(0), 0d); Assert.assertEquals(valueAtN, f.value(n), 0d); Assert.assertEquals(0, f.value(Long.MAX_VALUE), 0d); }