question: public static double lnFunc ( double num ) { if ( num <= 0 ) { return 0 ; } else { if ( num < MAX_INT_FOR_CACHE_PLUS_ONE ) { int n = ( int ) num ; if ( ( double ) n == num ) { return INT_N_LOG_N_CACHE [ n ] ; } } return num * Math . log ( num ) ; } }
target:  Help method for computing entropy.