Module:Infobox ET: Difference between revisions

R-4981 (talk | contribs)
No edit summary
R-4981 (talk | contribs)
No edit summary
Line 240: Line 240:
for i=1, math.floor(et.size)-2 do
for i=1, math.floor(et.size)-2 do
for j=1, i-1 do
for j=1, i-1 do
local delta = (rat.log(i * step_size / 1200) - rat.log(j * step_size / 1200)) / (rat.log(j * step_size / 1200) - 1)
local delta = (math.pow(2, i * step_size / 1200) - math.pow(2, j * step_size / 1200)) / (math.pow(2, j * step_size / 1200) - 1)
local he = interval_extension.harmonic_entropy_with_lookup_table(rat.cents(delta))
local he = interval_extension.harmonic_entropy_with_lookup_table(rat.cents(delta))
if he <= delta_harmonic_entropy_min then delta_harmonic_entropy_min = he end
if he <= delta_harmonic_entropy_min then delta_harmonic_entropy_min = he end