stepthom/math-fun — pull request #10 by ajslater (2013-09-15 07:42:59+00:00)
Title: Fractions

Fixes Issue #5

Two things I'm doing in my output with this one:

1) Collapsing fractions with numerator = 1 into integers upon printing.
2) 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).