Module:No-1s limits: Difference between revisions
Dummy index (talk | contribs) mNo edit summary |
Dummy index (talk | contribs) 9-odd-limit or over case |
||
| Line 223: | Line 223: | ||
end | end | ||
end | end | ||
rets[1] = '' | |||
if et.equave ~= 2 then | |||
local i = table.find(primes, et.equave) | |||
if i then | |||
rets[1] = rets[1] .. string.sub(wart, i, i) | |||
else | |||
rets[1] = rets[1] .. 'q' | |||
end | |||
end | |||
rets[1] = rets[1] .. et.size | |||
if limit < minprime * minprime then | if limit < minprime * minprime then | ||
local nonpatent = false | local nonpatent = false | ||
| Line 235: | Line 246: | ||
end | end | ||
end | end | ||
if nonpatent then | if nonpatent then | ||
rets[2] = '' .. rets[1] | rets[2] = '' .. rets[1] | ||
| Line 268: | Line 269: | ||
end | end | ||
else | else | ||
for i = 1, #val do | |||
local ip = primes[i] | |||
if ip * minprime <= limit then | |||
if val[i] ~= patent_val[i] then | |||
return '(error)' | |||
end | |||
end | |||
local difference = (val[i] - patent_val[i]) * wart_dir[i] | |||
if difference > 0 then | |||
rets[1] = rets[1] .. string.rep(string.sub(wart, i, i), difference * 2) | |||
elseif difference < 0 then | |||
rets[1] = rets[1] .. string.rep(string.sub(wart, i, i), -difference * 2 - 1) | |||
end | |||
end | |||
end | end | ||
return table.concat (rets, ", ") | return table.concat (rets, ", ") | ||