{"abstract":"A descending whole tone returns 9/10 instead of 8/9 and a descending tritone 45/64 instead of 32/45.","category":"Music interval and transposition theory","checks":8,"contract":"Input an integer semitone count (negative = descending). Ascending ratios use the table 1/1 16/15 9/8 6/5 5/4 4/3 45/32 3/2 8/5 5/3 9/5 15/8 per pitch class, times 2 per octave. A descending interval is the reciprocal of the ascending one of the same size. Return \"p/q\" in lowest terms (always with a denominator); non-integers and booleans return None.","evaluation_group":"w2-music-interval-just-ratio","failed_approach":"Taking the reciprocal of the table entry alone drops the octave factor for descending compound intervals.","family":"w2-music-interval-just-ratio-descending-reciprocal","id":"FA-81086","implementations":{"attempt":{"sha256":"21bf52a05f8b9b4cbf1b13a2e01d82600bdb2d2c0c5634dc77196c89b7693ba3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    table = ['1/1', '16/15', '9/8', '6/5', '5/4', '4/3', '45/32', '3/2', '8/5', '5/3', '9/5', '15/8']\n    if not isinstance(x, int) or isinstance(x, bool):\n        return None\n    n = abs(x)\n    r = Fraction(table[n % 12]) * 2 ** (n // 12)\n    if x < 0:\n        r = 1 / Fraction(table[n % 12])\n    return str(r.numerator) + '/' + str(r.denominator)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(0, '1/1'), (1, '16/15'), (2, '9/8'), (3, '6/5'), (-2, '8/9'), (-12, '1/2'), (-14, '4/9'), (-19, '1/3')], [(3, '6/5'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (-6, '32/45'), (-13, '15/32'), (-24, '1/4'), (-10, '5/9')], [(6, '45/32'), (7, '3/2'), (8, '8/5'), (9, '5/3'), (10, '9/5'), (-2, '8/9'), (-12, '1/2'), (-14, '4/9')], [(9, '5/3'), (10, '9/5'), (11, '15/8'), (12, '2/1'), (-6, '32/45'), (-13, '15/32'), (-19, '1/3'), (-10, '5/9')], [(12, '2/1'), (13, '32/15'), (19, '3/1'), (24, '4/1'), (-1, '15/16'), (-2, '8/9'), (-14, '4/9'), (-24, '1/4')]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"a47ea4fa218fe39463c8028a7eaedbf3db848a46ddbf6c9ae9fd7b295f0926b7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    table = ['1/1', '16/15', '9/8', '6/5', '5/4', '4/3', '45/32', '3/2', '8/5', '5/3', '9/5', '15/8']\n    if not isinstance(x, int) or isinstance(x, bool):\n        return None\n    n = x\n    r = Fraction(table[n % 12]) * Fraction(2) ** (n // 12)\n    return str(r.numerator) + '/' + str(r.denominator)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(0, '1/1'), (1, '16/15'), (2, '9/8'), (3, '6/5'), (-2, '8/9'), (-12, '1/2'), (-14, '4/9'), (-19, '1/3')], [(3, '6/5'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (-6, '32/45'), (-13, '15/32'), (-24, '1/4'), (-10, '5/9')], [(6, '45/32'), (7, '3/2'), (8, '8/5'), (9, '5/3'), (10, '9/5'), (-2, '8/9'), (-12, '1/2'), (-14, '4/9')], [(9, '5/3'), (10, '9/5'), (11, '15/8'), (12, '2/1'), (-6, '32/45'), (-13, '15/32'), (-19, '1/3'), (-10, '5/9')], [(12, '2/1'), (13, '32/15'), (19, '3/1'), (24, '4/1'), (-1, '15/16'), (-2, '8/9'), (-14, '4/9'), (-24, '1/4')]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"d1a89f2d37641f1220eb803a30814911336d2d1e6d73dfefb90eefc1345e4d55","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    table = ['1/1', '16/15', '9/8', '6/5', '5/4', '4/3', '45/32', '3/2', '8/5', '5/3', '9/5', '15/8']\n    if not isinstance(x, int) or isinstance(x, bool):\n        return None\n    n = abs(x)\n    r = Fraction(table[n % 12]) * 2 ** (n // 12)\n    if x < 0:\n        r = 1 / r\n    return str(r.numerator) + '/' + str(r.denominator)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[(0, '1/1'), (1, '16/15'), (2, '9/8'), (3, '6/5'), (-2, '8/9'), (-12, '1/2'), (-14, '4/9'), (-19, '1/3')], [(3, '6/5'), (4, '5/4'), (5, '4/3'), (6, '45/32'), (-6, '32/45'), (-13, '15/32'), (-24, '1/4'), (-10, '5/9')], [(6, '45/32'), (7, '3/2'), (8, '8/5'), (9, '5/3'), (10, '9/5'), (-2, '8/9'), (-12, '1/2'), (-14, '4/9')], [(9, '5/3'), (10, '9/5'), (11, '15/8'), (12, '2/1'), (-6, '32/45'), (-13, '15/32'), (-19, '1/3'), (-10, '5/9')], [(12, '2/1'), (13, '32/15'), (19, '3/1'), (24, '4/1'), (-1, '15/16'), (-2, '8/9'), (-14, '4/9'), (-24, '1/4')]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"oracle %d\" % i, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic bounded teaching model with a stipulated toy contract; it is not a complete music notation or theory engine. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-music-interval-just-ratio-descending-reciprocal","generated_at":"2026-09-29T14:49:59.884644+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tuning tables and retuning tools convert interval sizes to exact frequency ratios.","repair":"Restore the descending reciprocal step so that it reads `n = abs(x)\nr = Fraction(table[n % 12]) * 2 ** (n // 12)\nif x < 0:\n    r = 1 / r`.","root_cause":"Descending sizes are mapped through Python floor modulo into the ascending table, which is not the reciprocal for asymmetric entries.","sha256":"4e8a5e6c0db4ed4b22623eb92eb65af73c7fff722940130398504ada6fc42f30","title":"Five-limit just ratio for a semitone interval: descending intervals looked up by floor modulo · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.782,"exit_code":1,"observations":[{"actual":"1/1","check":"oracle 0","expected":"1/1","passed":true},{"actual":"16/15","check":"oracle 1","expected":"16/15","passed":true},{"actual":"9/8","check":"oracle 2","expected":"9/8","passed":true},{"actual":"6/5","check":"oracle 3","expected":"6/5","passed":true},{"actual":"8/9","check":"oracle 4","expected":"8/9","passed":true},{"actual":"1/1","check":"oracle 5","expected":"1/2","passed":false},{"actual":"8/9","check":"oracle 6","expected":"4/9","passed":false},{"actual":"2/3","check":"oracle 7","expected":"1/3","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"1/1\", \"expected\": \"1/1\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"16/15\", \"expected\": \"16/15\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"9/8\", \"expected\": \"9/8\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"6/5\", \"expected\": \"6/5\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"8/9\", \"expected\": \"8/9\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"1/1\", \"expected\": \"1/2\", \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": \"8/9\", \"expected\": \"4/9\", \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": \"2/3\", \"expected\": \"1/3\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.151,"exit_code":1,"observations":[{"actual":"1/1","check":"oracle 0","expected":"1/1","passed":true},{"actual":"16/15","check":"oracle 1","expected":"16/15","passed":true},{"actual":"9/8","check":"oracle 2","expected":"9/8","passed":true},{"actual":"6/5","check":"oracle 3","expected":"6/5","passed":true},{"actual":"9/10","check":"oracle 4","expected":"8/9","passed":false},{"actual":"1/2","check":"oracle 5","expected":"1/2","passed":true},{"actual":"9/20","check":"oracle 6","expected":"4/9","passed":false},{"actual":"1/3","check":"oracle 7","expected":"1/3","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"1/1\", \"expected\": \"1/1\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"16/15\", \"expected\": \"16/15\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"9/8\", \"expected\": \"9/8\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"6/5\", \"expected\": \"6/5\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"9/10\", \"expected\": \"8/9\", \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": \"1/2\", \"expected\": \"1/2\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"9/20\", \"expected\": \"4/9\", \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": \"1/3\", \"expected\": \"1/3\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.458,"exit_code":0,"observations":[{"actual":"1/1","check":"oracle 0","expected":"1/1","passed":true},{"actual":"16/15","check":"oracle 1","expected":"16/15","passed":true},{"actual":"9/8","check":"oracle 2","expected":"9/8","passed":true},{"actual":"6/5","check":"oracle 3","expected":"6/5","passed":true},{"actual":"8/9","check":"oracle 4","expected":"8/9","passed":true},{"actual":"1/2","check":"oracle 5","expected":"1/2","passed":true},{"actual":"4/9","check":"oracle 6","expected":"4/9","passed":true},{"actual":"1/3","check":"oracle 7","expected":"1/3","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 0\", \"actual\": \"1/1\", \"expected\": \"1/1\", \"passed\": true}, {\"check\": \"oracle 1\", \"actual\": \"16/15\", \"expected\": \"16/15\", \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": \"9/8\", \"expected\": \"9/8\", \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": \"6/5\", \"expected\": \"6/5\", \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": \"8/9\", \"expected\": \"8/9\", \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": \"1/2\", \"expected\": \"1/2\", \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": \"4/9\", \"expected\": \"4/9\", \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": \"1/3\", \"expected\": \"1/3\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}