Oscar Benjamin

Results 1877 comments of Oscar Benjamin

> I was just concerned that users might be surprised if `1/x` is automatically rewritten. Other kinds of division such as `1/(r + r**2)` won't reduce to a polynomial function...

> The inverse of `r + r**2` can be found as `gcdex(r + r**2, r**3 + r + 1)[0]` when `r` is `CRootOf(x**3 + x + 1, 0)` Isn't that...

> How about organizing it so that `_eval_power` handles `CRootOf**n` and `radsimp` handles everything else? Yes, but there is the question about what to do when `n` is negative. Let's...

I think we should investigate how other computer algebra systems like Mathematica, Maple, etc handle their versions of RootOf.

In python-flint some poly types have a `pow_mod` method. It hasn't been added to `fmpq_poly` yet but e.g. for polynomials mod 11: ```python In [14]: x = flint.nmod_poly([0, 1], 11)...

> one cannot do the reverse and opt into building an `abi3` wheel I think I got this working in https://github.com/flintlib/python-flint/pull/326. You can set the default for `allow_limited_api` to false...

Bisected to fa8f61a9fcff611cc264454dbc1a6222ca7062e1 from gh-27136.

The code that does this in `symbol.py` is a mess including `__xnew_cached_` that I think should really be removed. I'm not sure that subclassing Symbol and modifying the way that...

The example code shown in the OP can be rewritten to avoid subclassing altogether: ```python def my_symbol(name, real, **kwargs): return Symbol(name, real=real, imaginary=not real, **kwargs) ```

The question is why this has to be a subclass of Symbol. You can subclass Expr for example and then implement the `_eval_is_*` methods but there is no reason for...