Module:No-1s limits: Difference between revisions

ArrowHead294 (talk | contribs)
m Sort dependencies
Dummy index (talk | contribs)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
local ET = require('Module:ET')
local ET = require('Module:ET')
local rat = require('Module:Rational')
local rat = require('Module:Rational')
local yesno = require("Module:Yesno")


-- compute all positive ratios n/m with n and m <= q modulo powers of equave
-- compute all positive ratios n/m with n and m <= q modulo powers of equave
Line 294: Line 295:
end
end


function p.for_small_edos (frame)
function p.for_small_edos(frame)
local lines = tonumber (frame.args['lines'])
local liners = tonumber(frame.args['lines'])
local debugg = yesno(frame.args['debug'])
local t_body = {}
local t_body = {}
local val = {}
local val = {}
for i = 1, lines do
for i = 1, liners do
local et = ET.parse('' .. i .. 'edo')
local et = ET.parse('' .. i .. 'edo')
local limit = p.consistency_limit(et, false, 43)
local limit = p.consistency_limit(et, false, 43)
local vals = p.vals(et, limit)
local vals = p.vals(et, limit)
t_body[i] = string.format ("|-\n| %s\n| %s\n| %s", i, limit, vals)
t_body[i] = string.format("|-\n| %s\n| %s\n| %s", i, limit, vals)
end
end


return "{| class=\"wikitable center-all mw-collapsible mw-collapsed\"\n" ..
local result = "{| class=\"wikitable center-all mw-collapsible mw-collapsed\"\n" ..
"|-\n" ..
"|-\n" ..
"! EDO\n" ..
"! EDO\n" ..
"! No-1s consistency limit\n" ..
"! No-1s consistency limit\n" ..
"! Associated vals\n" ..
"! Associated vals\n" ..
table.concat (t_body, "\n") ..
table.concat(t_body, "\n") ..
"\n|}"
"\n|}"
if debugg == true then
result = "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>"
end
return frame:preprocess(result)
end
end


return p
return p