Closed stepthom closed 11 years ago
Two things I'm doing in my output with this one:
Collapsing fractions with numerator = 1 into integers upon printing. Storing both negative and positive numerators and denominators, but normalizing the sign as attached to only the numerator upon printing.
By default I have fractions turned "off". That is I create fractions with a denominator of 1 and automatically collapse them as indicated in the last comment. To turn automatic generation of fractions on use the '-f' command line switch. (and combine it with the '-d' switch to make sure derivatives work).
Closed by PR #10.
Right now, the coefficient and exponent of a
Term
are integers. Change this so that they can be fractions, i.e., a numerator and a denominator. This will most likely involve implementing aFraction
class. Everything else should still work: printing, taking the derivative, etc.