Open behackl opened 3 years ago
Using Polyhedron
instead of Cone
in this case would be an option.
See also #30172, where an ABC for convex cones (not necessarily rational polyhedral) is in the works
Replying to @mkoeppe:
Using
Polyhedron
instead ofCone
in this case would be an option.
In this particular example, simplifying the ray directions would actually suffice. The ray list passed to Cone
is
[(((sqrt(5) - 1)*(sqrt(5) - 2) + sqrt(5) - 1)/((sqrt(5) - 1)*(sqrt(5) - 2) + 2*sqrt(5) - 4),
1)]
which actually is just
[(2, 1)]
But that doesn't change the fact that if the rays actually have non-rational components, Cone
isn't suitable.
When I try to use Polyhedron
with non-rational ray directions, I also get an error, e.g.,
sage: Polyhedron(rays=[(sqrt(2), 1)])
Traceback (most recent call last):
...
ValueError: no default backend for computations with Symbolic Ring
Did you mean that Polyhedron
could be used after moving the rays to some more appropriate base ring? Or am I missing something else?
Also, thanks for the reference to #30172!
You would need to pass base_ring=AA
. Polyhedron refuses to compute with SR
.
Replying to @mkoeppe:
You would need to pass
base_ring=AA
. Polyhedron refuses to compute withSR
.
Makes sense, thanks.
If you need cones with transcendental data, #30234 would be an approach.
FractionWithFactoredDenominator.critical_cone
returnsNone
when the corresponding critical point has non-rational coordinates. Consider the following example:For a point with rational coordinates, everything works as expected:
For non-rational coordinates, the critical cone returns
None
:CC: @MarkCWilson @kliem
Component: asymptotic expansions
Issue created by migration from https://trac.sagemath.org/ticket/32020