Contribution
Joined 18 April 2020
Contribution (talk | contribs) No edit summary |
m →Recent edits to EDx pages: format heading |
||
| (7 intermediate revisions by 2 users not shown) | |||
| Line 173: | Line 173: | ||
The template you created calls an inexistent module. If this template is work in progress, please add <code><nowiki>[[Category:Draft templates]]</nowiki></code> and don't use it in other pages until its basic functionality is complete. Thank you in advance. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 13:19, 28 March 2024 (UTC) | The template you created calls an inexistent module. If this template is work in progress, please add <code><nowiki>[[Category:Draft templates]]</nowiki></code> and don't use it in other pages until its basic functionality is complete. Thank you in advance. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 13:19, 28 March 2024 (UTC) | ||
= Recent edits to EDx pages = | == Recent edits to EDx pages == | ||
Hello! May I know where you get your numbers from? For instance, you have written in the Ed11/9 page that: | Hello! May I know where you get your numbers from? For instance, you have written in the Ed11/9 page that: | ||
| Line 189: | Line 189: | ||
<pre> | <pre> | ||
# Enter the values for the X ratio of EDX. Ensure the numerator and denominator differ by 1 or 2. | # Enter the values for the X ratio of EDX. Ensure the numerator and denominator differ by 1 or 2. | ||
numerator, denominator = | numerator, denominator = 3, 2 | ||
# Program | # Program | ||
| Line 196: | Line 196: | ||
def calculate_complementary_pair(numerator, denominator): | def calculate_complementary_pair(numerator, denominator): | ||
""" | """ | ||
Calculates the | Calculates the superparticular complementary pair based on the difference | ||
between the numerator and denominator. | between the numerator and denominator. | ||
""" | """ | ||
| Line 224: | Line 224: | ||
return 1200 * log(ratio) / log(2) | return 1200 * log(ratio) / log(2) | ||
def print_mappings(ratio_log, | def print_mappings(ratio_log, superparticular_log, numerator, denominator): | ||
""" | """ | ||
Prints the mapping of ratios and their differences in logarithmic cents. | Prints the mapping of ratios and their differences in logarithmic cents. | ||
""" | """ | ||
for ed in range(1, 101): | for ed in range(1, 101): | ||
mapping = int( | mapping = int(superparticular_log / (ratio_log / ed) + 0.5) # Rounds to the nearest integer | ||
error = mapping * (ratio_log / ed) - | error = mapping * (ratio_log / ed) - superparticular_log | ||
print(f"scale: {ed}ed{numerator}/{denominator}, error: {error:.5f}") | print(f"scale: {ed}ed{numerator}/{denominator}, error: {error:.5f}") | ||
# Calculate the | # Calculate the superparticular complementary pairs | ||
(pair_1, pair_2) = calculate_complementary_pair(numerator, denominator) | (pair_1, pair_2) = calculate_complementary_pair(numerator, denominator) | ||
print(f" | print(f"Successive superparticular complementary pair of {numerator}/{denominator}: {pair_1[0]}/{pair_1[1]} and {pair_2[0]}/{pair_2[1]}") | ||
# Calculate ratios | # Calculate ratios | ||
ratio = numerator / denominator | ratio = numerator / denominator | ||
superparticular_complementary_ratio = pair_1[0] / pair_1[1] | |||
# Calculate the logarithmic values for the ratios in cents | # Calculate the logarithmic values for the ratios in cents | ||
ratio_log_cents = calculate_log_ratio(ratio) | ratio_log_cents = calculate_log_ratio(ratio) | ||
superparticular_complementary_log_cents = calculate_log_ratio(superparticular_complementary_ratio) | |||
# Output the mappings | # Output the mappings | ||
print_mappings(ratio_log_cents, | print_mappings(ratio_log_cents, superparticular_complementary_log_cents, numerator, denominator) | ||
</pre> | </pre> | ||
== Please stop stuffing the site with enormous machine-generated tables that no one asks for == | |||
Consider this a formal warning. —[[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 08:51, 9 November 2025 (UTC) | |||