public static double log ( double d , double base ) { if ( base == 1.0 || base <= 0.0 ) { throw new IllegalArgumentException ( "Invalid base for logarithm." ) ; } return Math . log ( d ) / Math . log ( base ) ; }
Returns the logarithm of a number at an arbitrary base .