code: @Override 
      public double fromReal(double x) {
          long sign = POSITIVE;
          if (x < 0) {
              sign = NEGATIVE;
              x = -x;  
          }
          return compact(sign, FastMath.log(x));
      }
docs: Converts a real value to its compacted representation.