diff --git a/exercises/rational-numbers/canonical-data.json b/exercises/rational-numbers/canonical-data.json index 0ee600acd9..82335b8d12 100644 --- a/exercises/rational-numbers/canonical-data.json +++ b/exercises/rational-numbers/canonical-data.json @@ -400,6 +400,38 @@ "r": [0, 1] }, "expected": 1.0 + }, + { + "uuid": "da137f1c-fc94-4035-9813-94f5152a1102", + "description": "Raise a negative real number to a rational number that has been reduced", + "property": "expreal", + "input": { + "x": -1, + "r": [1, 1] + }, + "expected": -1.0 + }, + { + "uuid": "9abd9332-eeab-4139-afa2-2f82efdae421", + "description": "Raise a negative real number to a rational number that has not been reduced", + "property": "expreal", + "input": { + "x": -1, + "r": [2, 2] + }, + "expected": -1.0 + }, + { + "uuid": "f3734f78-91b2-4e59-905e-8c61dbf34f39", + "description": "Fails with a negative real number if the denominator of the reduced rational number is even", + "property": "expreal", + "input": { + "x": -1, + "r": [1, 2] + }, + "expected": { + "error": "the result of this operation is a complex number" + } } ] },