Enhance SymPy Integer Division

via Freelancer ·

Budget / SalaryHourly project
TypeFreelance project
LocationRemote
Posted2 hours ago
I’m working on a personal project that leans heavily on SymPy, and I’ve hit a limitation with the way the library handles division when both operands are integers. What I need is a clean modification to SymPy’s source so I can keep every operation strictly in the integer domain—avoiding automatic promotion to Rational objects—while preserving all of SymPy’s usual behaviour for non-integer or mixed-type inputs.

Here’s what the job entails:

• Identify the precise spot in SymPy’s core (likely sympy/core/numbers.py or related) where integer division is resolved.
• Implement a path that returns the floor-divided Integer result (e.g. 7/3 → 2) or, if you prefer, expose a switch/flag or subclass that activates this behaviour only when requested so the standard API remains intact for most users.
• Maintain compatibility with SymPy’s assumptions system and ensure no regressions elsewhere; all existing unit tests must still pass.
• Supply your own focused test cases that demonstrate the new integer-division logic and show that speed or memory footprint is at least on par with the original code.
• Deliverables: a patch (or fork/branch) ready to merge, plus a short demo script that I can run immediately.

I’ll review by running SymPy’s full test suite along with your additional tests. If everything is green and the demo behaves exactly as described, the milestone is complete.
c programming python algorithm software architecture c++ programming mathematics software development software engineering
Apply on Freelancer →

Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.