Open ZackSheffieldSEL opened 4 years ago
You can use the division algorithm simply by making it a function. (I'm a beginner, so I don't know if this is a good way.)
@heteloo, you are correct, but the idea of division for fixed point arithmetic is somewhat ambiguous. The 2 links in my first comment address ways to implement division, but given that fixed-point division is a somewhat niche and specialized operation I think it probably makes sense to leave the division operation undefined and let users implement it themselves if needed.
As of 1.0.0, the
__truediv__
and__floordiv__
operators returnNotImplemented
.Here are some resources for implemented fixed point division: