question: private static double logAdd ( double x , double y ) { if ( y <= x ) { return x + Math . log1p ( Math . exp ( y - x ) ) ; } else { return y + Math . log1p ( Math . exp ( x - y ) ) ; } }
target:  Adds two numbers that are in the log domain, avoiding underflow.