Ticket #4534 (closed defect: fixed)

Opened 22 months ago

Last modified 22 months ago

[with new patch, positive review] Stupid error in odd_part

Reported by: craigcitro Owned by: craigcitro
Priority: blocker Milestone: sage-3.2
Component: basic arithmetic Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

I introduced an error in odd_part while working on #4443; the attached patch is the obvious fix, along with a doctest.

Attachments

trac-4534.patch Download (0.7 KB) - added by craigcitro 22 months ago.
trac-4534-v2.patch Download (2.1 KB) - added by craigcitro 22 months ago.

Change History

Changed 22 months ago by craigcitro

Changed 22 months ago by craigcitro

  • status changed from new to assigned
  • summary changed from Stupid error in odd_part to [with patch, needs quick review] Stupid error in odd_part

Changed 22 months ago by mhansen

  • summary changed from [with patch, needs quick review] Stupid error in odd_part to [with patch, positive review] Stupid error in odd_part

Looks good.

Changed 22 months ago by robertwb

Wouldn't it be much faster to divide out by the valuation at 2?

Changed 22 months ago by craigcitro

Good point. I know I timed it when I wrote it (though I obviously didn't look at the output carefully) -- of course, since the broken version doesn't do much work, it's faster. Correcting it slows it way down.

Patch coming right up.

Changed 22 months ago by craigcitro

Changed 22 months ago by craigcitro

New patch, which should be much better. Unfortunately, it touches integer.pxd, so it takes a while to rebuild.

Changed 22 months ago by craigcitro

  • summary changed from [with patch, positive review] Stupid error in odd_part to [with new patch, needs review] Stupid error in odd_part

Changed 22 months ago by jsp

  • summary changed from [with new patch, needs review] Stupid error in odd_part to [with new patch, positive review] Stupid error in odd_part

Applied trac-4534-v2.patch

Run ./sage -b and did a make check

All tests passed except the known issue with combinat/species/library.py

So I give this ticket a positive review.

Jaap

Changed 22 months ago by mabshoff

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

Merged trac-4534-v2.patch in Sage 3.2.rc2

Note: See TracTickets for help on using tickets.