fraction.js
function(a, b) {

      parse(a, b);
      var t = (this["s"] * this["n"] * P["d"] - P["s"] * P["n"] * this["d"]);
      return (0 < t) - (t < 0);
    }
function(a, b) {

      parse(a, b);
      var t = (this["s"] * this["n"] * P["d"] - P["s"] * P["n"] * this["d"]);
      return (0 < t) - (t < 0);
    }
function ( a , b ) { parse ( a , b ) ; var t = ( this [ "s" ] * this [ "n" ] * P [ "d" ] - P [ "s" ] * P [ "n" ] * this [ "d" ] ) ; return ( 0 < t ) - ( t < 0 ) ; }
Check if two rational numbers are the same

Ex: new Fraction(19.6).equals([98, 5]);
Check if two rational numbers are the same