Module:Rational: Difference between revisions

Weil height should be logarithmic. +Wilson height
Fix Weil height
Line 1,094: Line 1,094:
return nil
return nil
end
end
local h = p.tenney_height (a)
local h1 = p.tenney_height (a)
local h2 = 0
for factor, power in pairs(a) do
for factor, power in pairs(a) do
if type(factor) == 'number' then
if type(factor) == 'number' then
h = h + math.abs (power * math.log (factor) / math.log(2))
h2 = h2 + power * math.log (factor) / math.log(2)
end
end
end
end
return h
h2 = math.abs (h2)
return h1 + h2
end
end