Polynomial division over RR and CC
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Currently, when trying to divide polynomials with coefficients in an inexact field, an error is raised:
```m2
i1 : R = CC[x]
o1 = R
o1 : PolynomialRing
i2 : quotientRemainder(x^2 + 2, x - ii)
stdio:2:1:(3): error: polynomial division not yet implemented for RR or CC coefficients
```
However, commenting out the following lines seems to make things work just fine:
https://github.com/Macaulay2/M2/blob/048c777dc703365e44c3865b2c1faed698b82b3a/M2/Macaulay2/e/poly.cpp#L1162-L1166
For example:
```m2
i1 : R = CC[x]
o1 = R
o1 : PolynomialRing
i2 : quotientRemainder(x^2 + 2, x - ii)
o2 = (x + ii, 1)
o2 : Sequence
```
Is there a reason we're raising an error?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with M2/Macaulay2/e/poly.cpp at lines 1162-1166 and reproduce the shown quotientRemainder example for CC[x]. Determine why polynomial division is rejected for RR and CC, then verify that quotientRemainder produces the expected result for inexact-field coefficients without breaking existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100