Also, sympy does not support multivariate orders. And as we usually have variables tending to both limits, e.g. n, m etc to inf, and eps, delta etc to 0, using big_O might lead to incorrect expressions.
One option would be to instead return C * E instead of big_O(E) in call graphs etc. And while viewing expressions, the user can take big_O of the whole thing. Could possibly use SympySymbolAllocator to generate these constants.
big_O only takes into account all variables in the input expression (setting their limit to inf), but not once multiplied later.
Also, sympy does not support multivariate orders. And as we usually have variables tending to both limits, e.g.
n, m
etc to inf, andeps, delta
etc to 0, using big_O might lead to incorrect expressions.One option would be to instead return
C * E
instead ofbig_O(E)
in call graphs etc. And while viewing expressions, the user can takebig_O
of the whole thing. Could possibly useSympySymbolAllocator
to generate these constants.