-
-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Milestone
Description
The 'field' backend does not properly support non exact fields
sage: omega = 2*RR.pi() / 5
sage: verts = [((i*omega).sin(), (i*omega).cos()) for i in range(5)]
sage: verts
sage: Polyhedron(vertices=verts, base_ring=RR)
Traceback (most recent call last):
...
AssertionError:
or
sage: Q = polytopes.icosahedron()
sage: Q = polytopes.icosahedron(); Q
A 3-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5)^3 defined as the convex hull of 12 vertices
sage: Q_RR = Polyhedron(vertices = [n(v.vector(),digits=10) for v in Q.vertices()])
sage: Q_RR
A 3-dimensional polyhedron in (Real Field with 37 bits of precision)^3 defined as the convex hull of 7 vertices
sage: Q_RR = Polyhedron(vertices = [n(v.vector(),digits=30) for v in Q.vertices()])
sage: Q_RR
A 3-dimensional polyhedron in (Real Field with 103 bits of precision)^3 defined as the convex hull of 1 vertex and 3 rays
We simply raise an error if somebody want to try this.
CC: @fchapoton @jplab @mkoeppe
Component: geometry
Keywords: bug, days84
Author: Vincent Delecroix
Branch: c28fcf0
Reviewer: Jean-Philippe Labbé
Issue created by migration from https://trac.sagemath.org/ticket/18220