cntx/fraction.js — pull request #1 by Skare69 (2012-06-27 14:11:23+00:00)
Title: Fixed a bug with zero fractures. 

Added correct handling for zero numerators in new Fraction objects, e.g. Fraction(0,x) where x > 0.

Formerly this produced NaN objects:

> var zero_frac = new Fraction(0,5);
> zero_frac
{ numerator: 0, denominator: 1 }
> var sum = zero_frac.add(4);
undefined
> sum
{ numerator: NaN, denominator: NaN }