Skip to content

Commit

Permalink
Add case for when the rational number has not been reduced
Browse files Browse the repository at this point in the history
  • Loading branch information
natanaelsirqueira committed Mar 2, 2023
1 parent 51304e8 commit 9a2b1cb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion exercises/rational-numbers/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,14 +403,24 @@
},
{
"uuid": "da137f1c-fc94-4035-9813-94f5152a1102",
"description": "Raise a negative real number to a rational number",
"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",
Expand Down

0 comments on commit 9a2b1cb

Please sign in to comment.