Edit: I looked at the paper you linked in the comment. I'm no expert in quantum computing, but it seems like a hot mess. The notation is certainly not clear to me, but if you can clear it up then I'll edit this formulation. The following is my best guess.
I believe you have a number of typos. First, I believe you are conflating equivalent expressions for ...
In divround, pint and qint must be the integer parts of pfrac and qfrac, However, as I understand, in Python, converting a float to an int always rounds it towards 0, i.e., positive floats are rounded down, but negative floats are rounded up, so int(-2.7) is -2, not -3. Instead of
pint, qint = [int(thing) for thing in (pfrac, qfrac)]
you should have
This model is implemented using Julia's DifferentialEquations.jl in this tutorial. Here's a version of that code:
(S,I,R) = u
(β,c,γ) = p
N = S+I+R