code: public static boolean isDoubleValue(BigDecimal value) {
  		if (value.compareTo(DOUBLE_MAX_VALUE) > 0) {
  			return false;
  		}
  		if (value.compareTo(DOUBLE_MAX_VALUE.negate()) < 0) {
  			return false;
  		}
  
  		return true;
  	}
docs: Returns whether the specified {@link BigDecimal} value can be represented as <code>double</code>.
  
  <p>If this returns <code>true</code> you can call {@link BigDecimal#doubleValue()}
  without fear of getting {@link Double#POSITIVE_INFINITY} or {@link Double#NEGATIVE_INFINITY} as result.</p>
  
  <p>Example: <code>BigDecimalMath.isDoubleValue(new BigDecimal("1E309"))</code> returns <code>false</code>,
  because <code>new BigDecimal("1E309").doubleValue()</code> returns <code>Infinity</code>.</p>
  
  <p>Note: This method does <strong>not</strong> check for possible loss of precision.</p>
  
  <p>For example <code>BigDecimalMath.isDoubleValue(new BigDecimal("1.23400000000000000000000000000000001"))</code> will return <code>true</code>,
  because <code>new BigDecimal("1.23400000000000000000000000000000001").doubleValue()</code> returns a valid double value,
  although it loses precision and returns <code>1.234</code>.</p>
  
  <p><code>BigDecimalMath.isDoubleValue(new BigDecimal("1E-325"))</code> will return <code>true</code>
  although this value is smaller than {@link Double#MIN_VALUE} (and therefore outside the range of values that can be represented as <code>double</code>)
  because <code>new BigDecimal("1E-325").doubleValue()</code> returns <code>0</code> which is a legal value with loss of precision.</p>
  
  @param value the {@link BigDecimal} to check
  @return <code>true</code> if the value can be represented as <code>double</code> value