Godtone (talk | contribs)
m add note for readers of the code of a subtle breaking change/bugfix
Godtone (talk | contribs)
m reduplicate warning
Line 1,303: Line 1,303:
# the default badness is the sum of the squares of the errors with each interval's contribution weighted proportional to its odd-limit complexity,
# the default badness is the sum of the squares of the errors with each interval's contribution weighted proportional to its odd-limit complexity,
# in terms of absolute (cent/octave) error (corresponding to the multiplication by et2) and divided by the sum of the weightings of the intervals.
# in terms of absolute (cent/octave) error (corresponding to the multiplication by et2) and divided by the sum of the weightings of the intervals.
# IMPORTANT: on Jan 9 i corrected rel_err**2 * et2 to rel_err**2 * et2**2 in et_badness which optimal_edo_sequence depends on;
#            strict_optimal_edo_sequence is unaffected however.
def et_badness(ivs,v,badness=lambda rel_err,x,et2: rel_err**2 * et2**2,weighting=lambda x: iv_complexity(x),combine='avg',et2=0):
def et_badness(ivs,v,badness=lambda rel_err,x,et2: rel_err**2 * et2**2,weighting=lambda x: iv_complexity(x),combine='avg',et2=0):
# if the weighting is unspecified, use the default of:
# if the weighting is unspecified, use the default of: