Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions exercises/rational-numbers/canonical-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,28 @@
"r": [0, 1]
},
"expected": 1.0
},
{
"uuid": "da137f1c-fc94-4035-9813-94f5152a1102",
"description": "Raise a negative real number to a rational number with an even numerator",
"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 numerator of the rational number is odd",
"property": "expreal",
"input": {
"x": -1,
"r": [1, 2]
},
"expected": {
"error": "impossible to raise a negative base to an exponent with an odd numerator"
}
}
]
},
Expand Down