You're right.  Committed the simplification.

On Tue, Jul 13, 2010 at 7:05 PM, Masood Mortazavi
<masoodmortaz...@gmail.com> wrote:
> In FailureDetector, in ArrivalWindow, in "double p(double t)",
>
> is
>
>        return 1 - ( 1 - Math.pow(Math.E, exponent) );
>
> really needed, instead of
>
>        return Math.pow(Math.E, exponent) ;
>
> I believe the integral of the the Exponential Distribution from "t" to
> infinity leads to the latter value.
>
> While most Java compilers are probably smart enough to take care of the
> redundant subtractions, there's no explanatory value I see in the former
> form. I just ran into this as I was reviewing the accrual failure detector
> code.
>
> - m .
>



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com

Reply via email to