public final DoubleWritable evaluate(HiveDecimalWritable writable) {
    if (writable == null) {
      return null;
    }

    double d = writable.doubleValue();
    doubleWritable.set(d);
    return doEvaluate(doubleWritable);
  }
Convert HiveDecimal to a double and call evaluate() on it.
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFMath.java