Ticket #4111 (closed defect: fixed)
[with patch, positive review] move basic types to new coercion model
| Reported by: | robertwb | Owned by: | robertwb |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.1.3 |
| Component: | coercion | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
This ticket depends on #4058
Attachments
Change History
comment:1 Changed 5 years ago by robertwb
- Summary changed from [with patch, needs review] move QQ to new coercion model to [with patch, needs review] move basic types to new coercion model
comment:4 Changed 5 years ago by mhansen
- Summary changed from [with patch, needs review] move basic types to new coercion model to [with patch, positive review] move basic types to new coercion model
Looks good and passes tests for me. Excellent work getting this patch made!
comment:5 Changed 5 years ago by mabshoff
Robert,
unfortunately I cannot get the patches to apply cleanly and there are various rejects. Sage 3.1.3.alpha1 should be out in a few hours. Could you please rebase them against that release and I will make sure they go in first.
Cheers,
Michael
comment:6 Changed 5 years ago by robertwb
Argh... I just rebased these against 3.1.2...
OK, I'll rebase them again (shouldn't be too hard).
comment:7 Changed 5 years ago by robertwb
I got a single reject in 4111-coerce-RR.patch, which I resolved, and some fuzz in 4111-coerce-QQ.patch, which I'm reposting. These should all apply fine against 3.1.3.alpha1 now.
comment:9 Changed 5 years ago by mabshoff
Robert,
I merged the four patches and the only issue is the following:
sage -t -long devel/sage/sage/rings/real_mpfr.pyx
**********************************************************************
File "/scratch/mabshoff/release-cycle/sage-3.1.3.alpha2/tmp/real_mpfr.py", line 1900:
sage: RR(-1.234567)._pari_()
Expected:
-1.2345670000000000000
Got:
-1.2345670000000000001
**********************************************************************
1 items had failures:
1 of 11 in __main__.example_58
***Test Failed*** 1 failures.
For whitespace errors, see the file /scratch/mabshoff/release-cycle/sage-3.1.3.alpha2/tmp/.doctest_real_mpfr.py
[10.8 s]
I don't changing the doctest is the solution here since the "Real Number Inputs Improved" patch from 3.1.2 was supposed to fix this. Or am I completely wrong here? Either way: feel free to add a patch here or in case it is something more than non-trivial open another ticket.
Cheers,
Michael
comment:10 Changed 5 years ago by mabshoff
- Status changed from new to closed
- Resolution set to fixed
Merged 4111-coerce-simplify.patch, 4111-coerce-CC.patch, 4111-coerce-QQ.2.patch and 4111-coerce-RR.2.patch in Sage 3.1.3.alpha2
comment:11 Changed 5 years ago by robertwb
Oh, I think I know what the issue is (we have two real fields of 53 bits prec). I'll post a patch that addresses this.
sage: (1.2).parent() is RR False
comment:12 Changed 5 years ago by AlexGhitza
Also, the patches at #4096 (which I will rebase against 3.1.3.alpha1 as soon as I have built it) will take care of this.
comment:13 Changed 5 years ago by robertwb
Actually, after those patches I get
sage: 1.2.parent() is RR True
Sit looks like a pari issue for sure. For example, I get
sage: (-1.23456)._pari_() -1.2345600000000000001
which isn't using RR.__call__ at all.
comment:14 Changed 5 years ago by mabshoff
- Cc AlexGhitza removed
I opened #4199 to make sure the issue does not escape us. I will test the pari patch and see if it fixes the problem.
Cheers,
Michael

