code: function reduce_continued_fraction_step(data){    
    // do 1 divided by fraction
    data = inverse_fraction(data);
    
    // do integer + fraction (which is numerator += integer * denominator)
    //$multiple = Tools_Math::multiply($data['integer'], $data['denominator']);
    //var multiple = data.integer.mul(data.denominator);
    var multiple = data.integer * data.denominator;
  
    //$data['numerator'] = Tools_Math::add($data['numerator'], $multiple);
    //data.numerator = data.numerator.add(multiple);
    data.numerator = data.numerator + multiple;
    
    return data;
  }
docs: single step in the reduction of a continued fraction
  it uses the following reduction method:
  
  [ ... , a, b] = [ ... , a + 1/b ]
  
  where 'a' may equal 8 and where 'b' may equal 5/6 - therefore
  
  a   b             a           b                 a     b
  [ ... , 8, 5/6] = [ ... , 8 + ( 1 / (5/6) ) ] = [ ... , 8 + (6/5) ] = [ ... , 46/5 ]
  
  which basically says where b is a fraction - inverse it and then add a*denominator to the numerator
  
  this function is based on: [Converting a Continued Fraction to a single Fraction](http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/cfINTRO.html#tofract)
  
  the 'data' parameter must contain 3 arguments:
  
  'integer' = the integer (in the above example, 'a')
  
  'numerator' = the numerator of the fraction (in the above example, numerator of 'b')
  
  'denominator' = the denominator of the fraction (in the above example, denominator of 'b')
  
  @access public
  @param object $data containing integer, numerator and denominator GMP resources
  @return object $data containing refactored integer, numerator and denominator GMP resources