Module:Q-odd-limit intervals: Difference between revisions

ArrowHead294 (talk | contribs)
No edit summary
ArrowHead294 (talk | contribs)
No edit summary
Line 202: Line 202:
local output_2 = "\n|}"
local output_2 = "\n|}"
local out_str_direct = output_0 .. t_title .. " (approximated directly)" .. output_1 .. table.concat(t_body_direct, "\n") .. output_2
local out_str_direct = output_0 .. t_title
local out_str_val = output_0 ..  t_title .. " (approximated with val)" .. output_1 .. table.concat(t_body_val, "\n") .. output_2
local out_str_val = output_0 ..  t_title
if tag ~= "none" then
out_str_direct = out_str_direct .. " (approximated directly)"
out_str_val = out_str_val .. " (approximated with val)"
end
out_str_direct = out_str_direct .. output_1 .. table.concat(t_body_direct, "\n") .. output_2
out_str_val = out_str_val .. output_1 .. table.concat(t_body_val, "\n") .. output_2
local out_str
local out_str
Line 229: Line 236:
local note = frame.args["note"]
local note = frame.args["note"]
local title = frame.args["title"]
local title = frame.args["title"]
local header = string.lower(frame.args["header"]:gsub("%s+", ""))
local tag = string.lower(frame.args["tag"]:gsub("%s+", ""))
local apx = string.lower(frame.args["apx"]:gsub("%s+", ""))
local apx = string.lower(frame.args["apx"]:gsub("%s+", ""))
Line 238: Line 247:
local monzo_list = odd_limit_monzo_list_gen(limit)
local monzo_list = odd_limit_monzo_list_gen(limit)
local out_str
local out_str
if frame.args["header"] ~= "none" then
if header ~= "none" then
out_str = "The following "
out_str = "The following "
if apx == "direct" and apx == "val" then
if apx == "direct" or apx == "val" then
out_str = out_str .. "table shows"
out_str = out_str .. "table shows"
else
else
Line 261: Line 270:
out_str = ""
out_str = ""
end
end
out_str = out_str .. approx(steps, subgroup, monzo_list, title, apx)
out_str = out_str .. approx(steps, subgroup, monzo_list, title, tag, apx)
return out_str
return out_str
end
end


return p;
return p;