Module:MOS in EDO allperiods: Difference between revisions
m a dash |
Looping up to sqrt(edo) skips a few factors after sqrt and before edo/2; fixed |
||
| Line 107: | Line 107: | ||
-- Call a for loop that produces a set of tables for each period count | -- Call a for loop that produces a set of tables for each period count | ||
-- Loop from 1 to half the edo minus 1 | |||
-- Skip mosses with period count of edo/2, since that would immediately be | |||
-- a degenerate mos, hence the minus 1. | |||
local result = "" | local result = "" | ||
for j = 1, math. | for j = 1, math.floor(edo / 2) - 1 do | ||
local number_of_periods = j | local number_of_periods = j | ||
if edo % number_of_periods == 0 then | if edo % number_of_periods == 0 then | ||