question: public void accept ( double x ) { if ( Double . isNaN ( x ) ) { return ; } n ++ ; if ( n == 1 ) { m = x ; s = 0.0 ; } else { double oldM = m ; double oldS = s ; m = oldM + ( x - oldM ) / n ; s = oldS + ( x - oldM ) * ( x - m ) ; } max = Math . max ( max , x ) ; min = Math . min ( min , x ) ; }
target:  Adds a value and updates the statistics. If the input value is a NaN, it is ignored.