code: public char num2char(double value, double[] cuts) {
      int idx = 0;
      if (value >= 0) {
        idx = cuts.length;
        while ((idx > 0) && (cuts[idx - 1] > value)) {
          idx--;
        }
      }
      else {
        while ((idx < cuts.length) && (cuts[idx] <= value)) {
          idx++;
        }
      }
      return ALPHABET[idx];
    }
docs: Get mapping of a number to char.
  
  @param value the value to map.
  @param cuts the array of intervals.
  @return character corresponding to numeric value.