public String toString() {
		String sign, strIm, strRe;
		double absIm = Math.abs(im);
		if (im < 0)
			sign = " - ";
		else
			sign = " + ";

		if (re % 1 == 0 && im % 1 == 0) {
			strRe = Integer.toString((int) re);
			strIm = Integer.toString((int) absIm);
		} else if (re % 1 == 0) {
			strRe = Integer.toString((int) re);
			strIm = Double.toString(absIm);
		} else if (im % 1 == 0) {
			strRe = Double.toString(re);
			strIm = Integer.toString((int) absIm);

		} else {
			strRe = Double.toString(re);
			strIm = Double.toString(absIm);
		}

		if (absIm == 1)
			strIm = "";

		return (strRe + sign + strIm + "i");
	}