public static double sign(double v) {
    if (v == 0) {
      return 0;
    } else if (v > 0) {
      return 1.0;
    } else {
      return -1.0;
    }
  }
Math expression evaluation helper functions.
Some of these are referenced from ColumnUnaryFunc.txt.
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/MathExpr.java