Module:Q-odd-limit intervals: Difference between revisions
ArrowHead294 (talk | contribs) No edit summary |
ArrowHead294 (talk | contribs) No edit summary |
||
| Line 179: | Line 179: | ||
for i = 1, #error_list do | for i = 1, #error_list do | ||
t_body_direct[i] = string.format("|-\n| %s | t_body_direct[i] = string.format("|-\n| %s || %s || %s", errlist_direct[i].ratiocomp, errlist_direct[i].error_abs_direct, errlist_direct[i].error_rel_direct) | ||
t_body_val[i] = string.format("|-\n| %s | t_body_val[i] = string.format("|-\n| %s || %s || %s", errlist_val[i].ratiocomp, errlist_val[i].error_abs_val, errlist_val[i].error_rel_val) | ||
end | end | ||
local output_0 = "{| class=\"wikitable center-all mw-collapsible mw-collapsed sortable\"\n" | local output_0 = "{| class=\"wikitable center-all mw-collapsible mw-collapsed sortable\"\n" | ||
"|+ style=\"white-space: nowrap;\" | " | local output_1 = "|+ style=\"white-space: nowrap;\" | " | ||
local | local output_2 = "\n" .. | ||
"|-\n" .. | "|-\n" .. | ||
"! class=\"unsortable\" | Interval and complement | "! class=\"unsortable\" | Interval and complement !! Error (abs, [[Cent|¢]]) !! Error (rel, [[Relative cent|%]])\n" | ||
local output_3 = "\n|}" | |||
local | |||
local out_str_direct = output_0 .. t_title | local out_str_direct = output_0 .. output_1 .. t_title | ||
local out_str_val = output_0 .. | local out_str_val = output_0 .. output_1 .. t_title | ||
if tag ~= "none" then | if tag ~= "none" then | ||
| Line 199: | Line 197: | ||
out_str_val = out_str_val .. " (using patent val)" | out_str_val = out_str_val .. " (using patent val)" | ||
end | end | ||
out_str_direct = out_str_direct .. | out_str_direct = out_str_direct .. output_2 .. table.concat(t_body_direct, "\n") .. output_3 | ||
out_str_val = out_str_val .. | out_str_val = out_str_val .. output_2 .. table.concat(t_body_val, "\n") .. output_3 | ||
if approx_t == "direct" then | if approx_t == "direct" then | ||
return out_str_direct | |||
elseif approx_t == "val" then | elseif approx_t == "val" then | ||
return out_str_val | |||
else | else | ||
return out_str_direct .. "\n\n" .. out_str_val | |||
end | end | ||
end | end | ||