#18213: A lot of polytopes constructor are broken
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: sage-6.7
Component: geometry | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/18123 | e598e289689ad8c294500303c89d5c1a0de2a060
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by vdelecroix):
* status: new => needs_review
* commit: => e598e289689ad8c294500303c89d5c1a0de2a060
* branch: => u/vdelecroix/18123
Old description:
> A lot of polytopes constructors in `sage.geometry.polyhedron.library`.
>
> 1. The Rhombicuboctahedron does not return what it should (as Python
> division was thought as Sage integer divisions). There is in the code
> {{{
> verts = [ [-3/2, -1/2, -1/2], [-3/2, -1/2, 1/2], [-3/2, 1/2, -1/2],
> ...
> }}}
>
> 2. The `great_rhombicuboctahedron` is defined over `QQ` but it should be
> defined over `QQ[sqrt(2)]`! There are in two places rough approximation
> of sqrt(2) in the code
> {{{
> v1 = QQ(131739771357/54568400000) # ~ sqrt(2) + 1 but actually 2 due to
> Python division
> v2 = QQ(104455571357/27284200000) # ~ 2 sqrt(2) but actually 3 due to
> Python division
> }}}
> Instead, we should use the `base_ring` argument (with appropriate
> defaults) and use `base_ring(2).sqrt()` instead.
>
> 3. While we're at it, remove the deprecations from #11634.
New description:
A lot of polytopes constructors in `sage.geometry.polyhedron.library`. For
example
1. The Rhombicuboctahedron does not return what it should (as Python
division was thought as Sage integer divisions). There is in the code
{{{
verts = [ [-3/2, -1/2, -1/2], [-3/2, -1/2, 1/2], [-3/2, 1/2, -1/2],
...
}}}
2. The `great_rhombicuboctahedron` is defined over `QQ` but it should be
defined over `QQ[sqrt(2)]`! There are in two places rough approximation of
sqrt(2) in the code
{{{
v1 = QQ(131739771357/54568400000) # ~ sqrt(2) + 1 but actually 2 due to
Python division
v2 = QQ(104455571357/27284200000) # ~ 2 sqrt(2) but actually 3 due to
Python division
}}}
Instead, we should use the `base_ring` argument (with appropriate
defaults) and use `base_ring(2).sqrt()` instead.
While we're at it, remove the deprecations from #11634.
--
Comment:
New commits:
||[http://git.sagemath.org/sage.git/commit/?id=5110cc954a88ce5477b7f35b60551aae69d9a788
5110cc9]||{{{Trac 18211: use LattE to compute the Ehrhart polynomial}}}||
||[http://git.sagemath.org/sage.git/commit/?id=cf2a10f56ecacf682d57bb355ddfd9980eaee001
cf2a10f]||{{{Trac 18211: another example using Birkhoff_polytope}}}||
||[http://git.sagemath.org/sage.git/commit/?id=ca8da5a732ca6247cc4ffd375f94f859b6cdf0b1
ca8da5a]||{{{Trac 18211: fixed spelling LattE integral*e*}}}||
||[http://git.sagemath.org/sage.git/commit/?id=d52053c18a593a621af90b43608851304bc32052
d52053c]||{{{Trac 18211: check error + options}}}||
||[http://git.sagemath.org/sage.git/commit/?id=0f5122bddee5f104a3e2ff65715129eb275452e7
0f5122b]||{{{Trac 18211: fix command line arguments}}}||
||[http://git.sagemath.org/sage.git/commit/?id=b877932445212ddfd72fd70079c53f17df6d5fd9
b877932]||{{{Trac 18211: fix arguments + doctests + cwd=SAGE_TMP}}}||
||[http://git.sagemath.org/sage.git/commit/?id=3b30bc8aa4c9da24fef6e5c7fdceafe59e6701e0
3b30bc8]||{{{Trac 18213: rewrite the polyhedron library}}}||
||[http://git.sagemath.org/sage.git/commit/?id=e598e289689ad8c294500303c89d5c1a0de2a060
e598e28]||{{{Trac 18123: fix doctests}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/18213#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.