Gets the number of guesses from the entropy passed in.

@param entropy a {@code Double} representing the number of guesses.
@return guesses {@code BigDecimal} that is calculated based on the entropy.
546455
public static BigDecimal getGuessesFromEntropy(final Double entropy)
    {
        final Double guesses_tmp = Math.pow(2, entropy);
        return new BigDecimal(guesses_tmp.isInfinite() ? Double.MAX_VALUE : guesses_tmp).setScale(0, RoundingMode.HALF_UP);
    }
907870
public static BigDecimal toBigDecimal(String number) {
		return (null == number) ? BigDecimal.ZERO : new BigDecimal(number);
	}
835208
public static double nextUp(double d) {
        if (Double.isNaN(d) || d == Double.POSITIVE_INFINITY) {
            return d;
        } else {
            d += 0.0;
            return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + ((d >= 0.0) ? +1 : -1));
        }
    }
961942
@Override
  public double nextRandom() {
    double val = random.nextDouble();
    if(val < .5) {
      return FastMath.log(2 * val) / rate + location;
    }
    else {
      return -FastMath.log(2. - 2. * val) / rate + location;
    }
  }
375827
public BigInteger getBaseCRLNumber() throws IOException {
        DeltaCRLIndicatorExtension dciExt = getDeltaCRLIndicatorExtension();
        if (dciExt != null) {
            BigInteger num = dciExt.get(DeltaCRLIndicatorExtension.NUMBER);
            return num;
        } else {
            return null;
        }
    }
114419
@Override
	public RandomVariable pow(double exponent) {
		return apply(new DoubleUnaryOperator() {
			@Override
			public double applyAsDouble(double x) {
				return FastMath.pow(x, exponent);
			}
		});
	}
879736
public BigDecimal getBigDecimal(String name) {
        Object found = content.get(name);
        if (found == null) {
            return null;
        } else if (found instanceof Double) {
            return new BigDecimal((Double) found);
        }
        return (BigDecimal) found;
    }
422920
public static final BigDecimal printRate(Rate rate)
   {
      BigDecimal result = null;
      if (rate != null && rate.getAmount() != 0)
      {
         result = new BigDecimal(rate.getAmount());
      }
      return result;
   }
883542
public BigDecimal getTotal() {

		BigDecimal total = BigDecimal.ZERO;

		for ( LineItem item : lineItems ) {
			total = total.add( item.getTotal() );
		}

		return total;
	}
1303801
def get_entropy(self):
        
        dim = self.mu.shape[0]
        entropy = 0.5 * (dim * (numpy.log(2. * numpy.pi) + 1.) + numpy.log(self.det))
        return entropy
1254827
public BigDecimal getBigDecimal(String fieldName) throws DbfException {
        Object value = get(fieldName);
        return value == null ? null : new BigDecimal(value.toString());
    }
486866
public static BigDecimal sum(EvaluationContext ctx, Object... args) {
        if (args.length == 0) {
            throw new RuntimeException("Wrong number of arguments");
        }

        BigDecimal result = BigDecimal.ZERO;
        for (Object arg : args) {
            result = result.add(Conversions.toDecimal(arg, ctx));
        }
        return result;
    }
281107
protected BigDecimal getDecimalConfig(IConfigKey key) {
        String value = getConfig(key);
        if (value == null) {
            return null;
        }
        return new BigDecimal(value);
    }
90694
public BigRational pow(int exponent) {
		if (exponent == 0) {
			return ONE;
		}
		if (exponent == 1) {
			return this;
		}

		final BigInteger n;
		final BigInteger d;
		if (exponent > 0) {
			n = numerator.toBigInteger().pow(exponent);
			d = denominator.toBigInteger().pow(exponent);
		}
		else {
			n = denominator.toBigInteger().pow(-exponent);
			d = numerator.toBigInteger().pow(-exponent);
		}
		return valueOf(n, d);
	}
906197
@Pure
	@Inline(value = "$2.valueOf($1.doubleValue())", imported = BigDecimal.class)
	public static BigDecimal toBigDecimal(AtomicDouble number) {
		return BigDecimal.valueOf(number.doubleValue());
	}
769535
protected String getCNonce(){
      Double d = Math.floor(Math.random()*16777215);
      return Long.toHexString(Double.doubleToRawLongBits( d ));
  }
153207
public Integer getDecimalDigits() {
    switch (this.type) {
    case BOOLEAN_TYPE:
    case TINYINT_TYPE:
    case SMALLINT_TYPE:
    case INT_TYPE:
    case BIGINT_TYPE:
      return 0;
    case FLOAT_TYPE:
      return 7;
    case DOUBLE_TYPE:
      return 15;
    case DECIMAL_TYPE:
      return typeQualifiers.getScale();
    case TIMESTAMP_TYPE:
      return 9;
    default:
      return null;
    }
  }