Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'u/jipilab/22552' of git://trac.sagemath.org/sage into 2…
Browse files Browse the repository at this point in the history
…2552
  • Loading branch information
jplab committed Aug 21, 2017
2 parents effcedb + 0ff050f commit 92b9dd0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/sage/geometry/polyhedron/constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,40 @@
A 2-dimensional polyhedron in (Number Field in sqrt3 with defining
polynomial x^2 - 3)^2 defined as the convex hull of 3 vertices
If the input consists of decimal numbers and the `base_ring` is not specified,
the base ring is set to be the `RealField` with the precision given by the
minimal precision of the input. If it has 53 bits of precision, the constructor
converts automatically the base ring to `RDF`::
sage: Polyhedron(vertices = [[1.12345678901234, 2.12345678901234]])
A 0-dimensional polyhedron in RDF^2 defined as the convex hull of 1 vertex
sage: Polyhedron(vertices = [[1.12345678901234, 2.123456789012345]])
A 0-dimensional polyhedron in RDF^2 defined as the convex hull of 1 vertex
sage: Polyhedron(vertices = [[1.123456789012345, 2.123456789012345]])
Traceback (most recent call last):
...
ValueError: no appropriate backend for computations with Real Field with 54 bits of precision
sage: Polyhedron(vertices = [[1.123456789012345, 2.123456789012345]], base_ring=RDF)
A 0-dimensional polyhedron in RDF^2 defined as the convex hull of 1 vertex
.. SEEALSO::
:mod:`Parents for polyhedra <sage.geometry.polyhedron.parent.Polyhedra>`
.. TESTS:
Check :trac:`22552`::
sage: Polyhedron(vertices=[(8.3319544851638732, 7.0567045956967727), (6.4876921900819049, 4.8435898415984129)])
Traceback (most recent call last):
...
ValueError: no appropriate backend for computations with Real Field with 57 bits of precision
sage: Polyhedron(vertices =[(8.3319544851638732, 7.0567045956967727), (6.4876921900819049, 4.8435898415984129)], base_ring=RealField(40))
Traceback (most recent call last):
...
ValueError: no appropriate backend for computations with Real Field with 40 bits of precision
Base classes
------------
Expand Down

0 comments on commit 92b9dd0

Please sign in to comment.