Skip to content

Commit ccb7364

Browse files
Add case for when the rational number has not been reduced
1 parent 51304e8 commit ccb7364

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

exercises/rational-numbers/canonical-data.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -403,14 +403,24 @@
403403
},
404404
{
405405
"uuid": "da137f1c-fc94-4035-9813-94f5152a1102",
406-
"description": "Raise a negative real number to a rational number",
406+
"description": "Raise a negative real number to a rational number that has been reduced",
407407
"property": "expreal",
408408
"input": {
409409
"x": -1,
410410
"r": [1, 1]
411411
},
412412
"expected": -1.0
413413
},
414+
{
415+
"uuid": "da137f1c-fc94-4035-9813-94f5152a1102",
416+
"description": "Raise a negative real number to a rational number that has not been reduced",
417+
"property": "expreal",
418+
"input": {
419+
"x": -1,
420+
"r": [2, 2]
421+
},
422+
"expected": -1.0
423+
},
414424
{
415425
"uuid": "f3734f78-91b2-4e59-905e-8c61dbf34f39",
416426
"description": "Fails with a negative real number if the denominator of the reduced rational number is even",

0 commit comments

Comments
 (0)