Ticket #1162 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

[with patch, positive review] fix issues in RealField <-> RQDF conversions

Reported by: zimmerma Owned by: jkantor
Priority: major Milestone: sage-2.9
Component: numerical Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description


Attachments

7333.patch Download (5.1 KB) - added by zimmerma 3 years ago.
1162.patch Download (6.3 KB) - added by cwitty 3 years ago.

Change History

Changed 3 years ago by zimmerma

Changed 3 years ago by cwitty

The first chunk of the patch (patching polynomial_element.pyx) makes doctesting polynomial_element.pyx fail for me (on 32-bit x86 Linux). (Plus, the first chunk seems unrelated to the other chunks, and to the bug report. Maybe it was included by accident?)

The other two chunks look good to me.

Changed 3 years ago by zimmerma

Yes the first chunk was included by accident and is unrelated. About this first chunk, I do not understand why roots() gives different results on different architectures. It shouldn't if mpfr is used inside.

Changed 3 years ago by cwitty

Changed 3 years ago by cwitty

I've added my own patch for these issues. It's based on Paul Zimmerman's patch (and includes the two chunks that I said "look good", above); but it also fixes issues with converting to complex, and adds some more doctests.

Changed 3 years ago by was

  • summary changed from [with patch] fix issues in RealField <-> RQDF conversions to [with patch, positive review] fix issues in RealField <-> RQDF conversions
was-1162: #1162 is ready.
[03:27am] was-1162: But it is hard to apply.
[03:27am] mabshoff: ok
[03:27am] was-1162: Basically apply each patch, ignore all the failed hunks.
[03:28am] mabshoff: arrg.
[03:28am] mabshoff: will do.
[03:28am] was-1162: then go into real_mpfr.pyx and manually delete
[03:28am] was-1162: 658        elif hasattr(x, '_mpfr_'):
[03:28am] was-1162: 659            return x._mpfr_(self)
[03:28am] was-1162: It's scary--
[03:28am] mabshoff: +1
[03:28am] was-1162: but *all* that is being done is that the rounding mode is being changed from Z to N in one place.
[03:28am] was-1162: and some doctests are being changed to reflect this.
[03:28am] mabshoff: ok

Changed 3 years ago by mabshoff

  • status changed from new to closed
  • resolution set to fixed

Merged in 2.9.rc0.

Note: See TracTickets for help on using tickets.