public static Double getEntropyFromGuesses ( final BigDecimal guesses ) { Double guesses_tmp = guesses . doubleValue ( ) ; guesses_tmp = guesses_tmp . isInfinite ( ) ? Double . MAX_VALUE : guesses_tmp ; return Math . log ( guesses_tmp ) / Math . log ( 2 ) ; }
Gets the entropy from the number of guesses passed in .