After my change to
ReadExpr so that it can read rational numbers, the fn now misreads
"2/3^4" and produces 16/81 instead of 2/81.
Rectify! And add a test!
It is a slightly subtle bug: at first sight it seems reasonable that
<constant>^<integer> should yield the obvious power of the constant, but this is not how I read
- Status changed from New to In Progress
- Assignee set to John Abbott
- % Done changed from 0 to 10
I see no choice but to make
2/3^4 read as an expression
div(2, power(3,4)), and this implies that all rationals expressed as explicit quotients have to be read as an expression
- Status changed from In Progress to Feedback
- % Done changed from 10 to 90
I have fixed it now, and added a new
test-RingElem5 for the function
ReadExpr (for rational numbers).
Trickier than expected; also not so easy coming up with the various test cases.
- Related to Bug #936: ReadExpr: cannot handle exponent which is not integer literal added
- Target version changed from CoCoALib-0.99560 to CoCoALib-0.99550 spring 2017
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
- Estimated time set to 2.60 h
Also available in: Atom