Bug #199
CFApprox: division by zero
Description
/**/ CFApprox(-0.51, 1/10); *************************************************************************** ****CoCoA ERROR**** ErrCode: CoCoA::ERR::DivByZero ****CoCoA ERROR**** Message: Division by zero or by a zero-divisor ****CoCoA ERROR**** Context: BigRat(N1,N2) ****CoCoA ERROR**** File: BigRat.C ****CoCoA ERROR**** Line: 99 ***************************************************************************
I guess the problem is in ContFracIter::operator++
myFrac = 1/(myFrac - myQuot); // strictly positive!
History
#1 Updated by John Abbott almost 12 years ago
- % Done changed from 0 to 100
The bug was a consequence of when I changed the definition of integer division (from round towards -infinity to round towards zero).
I have added a new test-NumTheory3.C
specifically for this bug.
#2 Updated by John Abbott almost 12 years ago
- Status changed from New to Closed
I forgot to close the issue and to count CVS time etc.
#3 Updated by Anna Maria Bigatti almost 12 years ago
- Assignee set to John Abbott
- Target version set to CoCoALib-0.9952
- Estimated time set to 0.75 h