You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looking at the coefficients, we can see that $a_4$, $a_3$, and $a_1$ are negligibly small; it's basically a parabola defined by $a_2 ≈ 1$ and $a_0 ≈ 0.69$, so the roots are $≈\sqrt(0.69) ≈ 0.83$. The $±5.1$ returned by find_roots_quartic is way off.
Use case
I'm using find_roots_quartic to find intersections between ellipses (cf. runsascoded/shapes), which reduces to solving a quartic equation. The coefficients/quartic above relate to intersecting a unit circle (centered at the origin) with this ellipse:
Similar to #23, but in this case
find_roots_quartic
returns substantially incorrect values:Output (open in Rust Explorer):
Note that plugging the roots back into
f
yields25.37884091853862
(supposed to be0
).Wolfram Alpha gives correct values:
Looking at the coefficients, we can see that$a_4$ , $a_3$ , and $a_1$ are negligibly small; it's basically a parabola defined by $a_2 ≈ 1$ and $a_0 ≈ 0.69$ , so the roots are $≈\sqrt(0.69) ≈ 0.83$ . The $±5.1$ returned by
find_roots_quartic
is way off.Use case
I'm using
find_roots_quartic
to find intersections between ellipses (cf. runsascoded/shapes), which reduces to solving a quartic equation. The coefficients/quartic above relate to intersecting a unit circle (centered at the origin) with this ellipse:center at$≈(-1.1, 0)$ , radii $≈(1, 1)$ :
The quartic above is actually solving for$y$ -coordinates, in terms of this picture; $±5.1$ is pretty nonsensical for these shapes!
The text was updated successfully, but these errors were encountered: