Arithmetic/Rational: Difference between revisions
Content deleted Content added
Line 1,906: | Line 1,906: | ||
repeat with i = 2 to the paramCount |
repeat with i = 2 to the paramCount |
||
p = param(i) |
p = param(i) |
||
if integerP(p) then p = frac(p) |
|||
num = res.num * p.denom + res.denom * p.num |
num = res.num * p.denom + res.denom * p.num |
||
denom = res.denom * p.denom |
denom = res.denom * p.denom |
||
Line 1,923: | Line 1,922: | ||
repeat with i = 2 to the paramCount |
repeat with i = 2 to the paramCount |
||
p = param(i) |
p = param(i) |
||
if integerP(p) then p = frac(p) |
|||
res = frac(res.num * p.num, res.denom * p.denom) |
res = frac(res.num * p.num, res.denom * p.denom) |
||
end repeat |
end repeat |