Module:Infobox ET: Difference between revisions

Plumtree (talk | contribs)
mNo edit summary
Plumtree (talk | contribs)
mNo edit summary
Line 103: Line 103:
})
})
end
end
local consistency = tonumber(frame.args['Consistency'])
-- 1. When an equave is too close to 1, large powers of this equave explode computations
-- 1. When an equave is too close to 1, large powers of this equave explode computations
-- 2. When an equave has too many factors, the number of those factors explode computations
-- 2. When an equave has too many factors, the number of those factors explode computations
-- 3. When an equave has too large factors, computations explode
-- 3. When an equave has too large factors, computations explode
if rat.geq(equave, rat.new(3, 2)) and rat.is_prime_ratio(equave) and rat.max_prime(equave) <= 47 then
if rat.geq(equave, rat.new(3, 2)) and rat.is_prime_ratio(equave) and rat.max_prime(equave) <= 47 then
local consistency = tonumber(frame.args['Consistency'])
if consistency == nil then
if consistency == nil then
consistency = l.consistency_limit(size, equave, false, 17)
consistency = l.consistency_limit(size, equave, false, 17)
Line 114: Line 115:
consistency = 'at least 17'
consistency = 'at least 17'
end
end
end
if consistency ~= nil then
table.insert(infobox_data, {
table.insert(infobox_data, {
'Consistency limit',
'Consistency limit',
consistency
consistency
})
})
end
local distinct_consistency = tonumber(frame.args['Distinct consistency'])
if rat.geq(equave, rat.new(3, 2)) and rat.is_prime_ratio(equave) and rat.max_prime(equave) <= 47 then
if distinct_consistency == nil then
distinct_consistency = l.consistency_limit(size, equave, true, 29)
end
if distinct_consistency == nil then
distinct_consistency = 'at least 29'
end
end
if distinct_consistency ~= nil then
table.insert(infobox_data, {
table.insert(infobox_data, {
'Distinct consistency limit',
'Distinct consistency limit',
l.consistency_limit(size, equave, true)
distinct_consistency
})
})
end
end