code: private BigDecimal parse(String raw) {
      raw = raw.trim();
      switch (raw) {
        case "pi":
          return PI;
        default:
          return new BigDecimal(raw);
      }
    }
docs: Convert the given string to a BigDecimal or a constant if given, e.g. "pi"