Module:Q-odd-limit intervals: Difference between revisions
ArrowHead294 (talk | contribs) No edit summary |
ArrowHead294 (talk | contribs) No edit summary |
||
| Line 183: | Line 183: | ||
end | end | ||
local | --local output_0 = "{| class=\"wikitable center-all mw-collapsible mw-collapsed sortable\"\n" .. | ||
"|+ style=\"white-space: nowrap;\" | " .. t_title .. | --"|+ style=\"white-space: nowrap;\" | " .. t_title .. | ||
(approx_t == "direct" and " (approximated directly)" or " (approximated with val)") .. "\n" .. | --(approx_t == "direct" and " (approximated directly)" or " (approximated with val)") .. "\n" .. | ||
--"|-\n" .. | |||
--"! class=\"unsortable\" | Interval and complement " .. | |||
--"!! Error (abs, [[Cent|¢]]) " .. | |||
--"!! Error (rel, [[Relative cent|%]])\n" .. | |||
--table.concat((approx_t == "direct" and table.concat( or t_body_val), "\n") .. | |||
--"\n|}" | |||
local output_0 = "{| class=\"wikitable center-all mw-collapsible mw-collapsed sortable\"\n" .. | |||
"|+ style=\"white-space: nowrap;\" | " | |||
local output_1 = "\n" .. | |||
"|-\n" .. | "|-\n" .. | ||
"! class=\"unsortable\" | Interval and complement " .. | "! class=\"unsortable\" | Interval and complement " .. | ||
"!! Error (abs, [[Cent|¢]]) " .. | "!! Error (abs, [[Cent|¢]]) " .. | ||
"!! Error (rel, [[Relative cent|%]])\n" .. | "!! Error (rel, [[Relative cent|%]])\n" | ||
local output_2 = "\n|}" | |||
"\n | |||
local out_str_direct = output_0 .. t_title .. " (approximated directly)" .. output_1 .. table.concat(table.concat(t_body_direct, "\n")) .. output_2 | |||
local out_str_val = output_0 .. t_title .. " (approximated with val)" .. output_1 .. table.concat(table.concat(t_body_val, "\n")) .. output_2 | |||
local out_str | |||
if approx_t == "direct" then | |||
out_str = out_str_direct | |||
elseif approx_t == "val" then | |||
out_str = out_str_val | |||
else | |||
out_str = out_str_direct .. "\n\n" .. out_str_val | |||
end | |||
return | return out_str | ||
end | end | ||