Module:Interval table: Difference between revisions
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
| Line 26: | Line 26: | ||
for j=1,max_nd do | for j=1,max_nd do | ||
t = i/gcd(i,j) .. "/" .. j/gcd(i,j) | t = i/gcd(i,j) .. "/" .. j/gcd(i,j) | ||
if (i/j) >= 1 and (i/j) <= max_size and not u. | if (i/j) >= 1 and (i/j) <= max_size and not u.table_contains(ratio_strings, t) then | ||
ratios[#ratios + 1] = {i/gcd(i,j),j/gcd(i,j)} | ratios[#ratios + 1] = {i/gcd(i,j),j/gcd(i,j)} | ||
ratio_strings[#ratio_strings + 1] = t | ratio_strings[#ratio_strings + 1] = t | ||
| Line 105: | Line 105: | ||
for j=1,#ratios_list do | for j=1,#ratios_list do | ||
-- Go through all ratios, if they are mapped to the current step in the ET's patent val, add to approximate ratios column | -- Go through all ratios, if they are mapped to the current step in the ET's patent val, add to approximate ratios column | ||
t = mapping(u. | t = mapping(u.get_monzo(ratios_list[j]), patent_val) | ||
if t == i then | if t == i then | ||
wikitext = wikitext .. ratios_list[j][1] .. '/' .. ratios_list[j][2] .. ', ' | wikitext = wikitext .. ratios_list[j][1] .. '/' .. ratios_list[j][2] .. ', ' | ||