Christopher Smith
Christopher Smith
The problem is that Plane.distance(Line) starts with ```python if self.intersection(o) != []: return S.Zero ``` In the case of `plane.intersection(l1)` we have ```python >>> plane.intersection(l1) [Point3D(x - z*(x - 1)/(z...
Or else NotImplemented for the case where the answer is symbolic in an ambiguous way. This returning of 0 is like wrongly handling `if Eq(a, b): print('true')`: we now raise...
yes. The `Line((x,y,z),(1,1,1))` may or may not pass through `Plane((0,0,0),(1,0,0),(1,1,0))` so it is wrong to say that it *does* pass through (and, hence, to return 0). If we aren't going...
I left a comment on #25085
Should `nsimplify` do that automatically if there are no Floats in the expression?
chop should not be used when multiplying numbers, only when adding or subtracting numbers (in small quantities). If you look at the numerical evaluation of the arguments of the expr...
You can give `nsimplify` a hint of what you expect to see in the result. ```python >>> eq.n(3).nsimplify([sqrt(2)]) 3 - 2*sqrt(2) ``` Also, the size of the exponents is begging...
You can replace your desired inverse symbol, e.g. `dealyed_integrator.subs(1/z, Symbol('z^-1'))`. Or in case of the first example, simplification will help: ```python >>> expr = (s**2*exp(2*s) + 4*exp(s) - 4)*exp(-2*s)/(s*(s**2 +...
The z-expression can also be rewritten as ```python >>> expand(1/(z*(1 - 1/z))) 1/(z - 1) ``` And that looks pretty clean to me. For purposes of discussion, it would be...
If `x.is_comparable` then `y, z = x.as_real_imag()` where `z = 0` and `y._prec` is not 1, so line 427 should perhaps be `v = dif.as_real_imag()[0].n(2)`