Opened 12 years ago

Closed 12 years ago

#10209 closed defect (fixed)

typo in vm_basis.py

Reported by: Alex Ghitza Owned by: Craig Citro
Priority: minor Milestone: sage-4.6.1
Component: modular forms Keywords: delta
Cc: William Stein, Martin Raum Merged in: sage-4.6.1.alpha1
Authors: Alex Ghitza Reviewers: Martin Raum
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

A typo in the function delta_qexp in vm_basis.py means that an if statement which is supposed to speed things up over ZZ or QQ never gets it right.

Trivial patch coming up.

Attachments (1)

trac_10209.patch (802 bytes) - added by Alex Ghitza 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by Alex Ghitza

Attachment: trac_10209.patch added

comment:1 Changed 12 years ago by Alex Ghitza

Authors: Alex Ghitza
Cc: William Stein Martin Raum added

See the attached patch. I don't think the fix can be doctested, but here are some timings on sage-4.6.1.alpha0:

BEFORE THE PATCH:

sage: timeit('f = delta_qexp(100)')
625 loops, best of 3: 431 µs per loop
sage: timeit('f = delta_qexp(10000)')
25 loops, best of 3: 35.7 ms per loop
sage: timeit('f = delta_qexp(1000000)')
5 loops, best of 3: 6.42 s per loop

AFTER THE PATCH:

sage: timeit('f = delta_qexp(100)')
625 loops, best of 3: 304 µs per loop
sage: timeit('f = delta_qexp(10000)')
25 loops, best of 3: 28.9 ms per loop
sage: timeit('f = delta_qexp(1000000)')
5 loops, best of 3: 5.73 s per loop

comment:2 Changed 12 years ago by Martin Raum

That's right, apart from timings there is no "visible" difference. All tests pass, so I would give this a positive review. Do you want to change anything before?

comment:3 Changed 12 years ago by Alex Ghitza

Status: newneeds_review

Oops, just forgot to set it to "needs review".

comment:4 Changed 12 years ago by Martin Raum

Reviewers: Martin Raum
Status: needs_reviewpositive_review

comment:5 Changed 12 years ago by Jeroen Demeyer

Merged in: sage-4.6.1.alpha1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.