public static Number sign(Number a){
  if (isFloatingPoint(a)) {
    return Math.signum(a.doubleValue());
  }
 else {
    return Long.signum(a.longValue());
  }
}

public static Number sign ( Number a ) { if ( isFloatingPoint ( a ) ) { return Math . signum ( a . doubleValue ( ) ) ; } else { return Long . signum ( a . longValue ( ) ) ; } }
returns the sign of the number .
