stepthom / math-fun

Just testing out some fun with mathematics.
2 stars 2 forks source link

Pretty printing of exponents of 0 and 1. #16

Closed stepthom closed 11 years ago

stepthom commented 11 years ago

If the exponent of a term is 1, omit the "^1". E.g., "77x^1" should be "77x".

Similarly, if the exponent is 0, don't display the x term at all. E.g., "77x^0" should just be "77".