code: function multiplier(x) {
      var parts = x.toString().split('.');
      if (parts.length < 2) {
        return 1;
      }
      return Math.pow(10, parts[1].length);
    }
docs: Computes the multiplier necessary to make x >= 1,
  effectively eliminating miscalculations caused by
  finite precision.