29 Nov
2013
29 Nov
'13
4:47 p.m.
Hmm, this apparently presumes that the input fractions are reduced. 'Cause if say 2 divides both a and b, and we input (a/2)/(b/2) instead of a/b, this would output (a/2 + c + e)/(b/2 + d + f) -- not the same thing. --Dan On 2013-11-29, at 11:44 AM, Bill Gosper wrote:
In[904]:= mediant[a/b, c/d, e/f]
Out[904]= (a + c + e)/(b + d + f)