Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve accuracy of polytopes.regular_polygon() #17131

Closed
jdemeyer opened this issue Oct 11, 2014 · 8 comments
Closed

Improve accuracy of polytopes.regular_polygon() #17131

jdemeyer opened this issue Oct 11, 2014 · 8 comments

Comments

@jdemeyer
Copy link

The function polytopes.regular_polygon() uses a hard-coded approximation of pi (3.14159265359) which has an error of 466 ulp. Moreover, it uses Python floats instead of RR.

Note: there are actually a lot of these fishy approximations (like QQ(1618033)/1000000 for the golden ratio). Since this ticket is intended to avoid a doctest failure in #17130, I only fixed regular_polygon().

Component: geometry

Author: Jeroen Demeyer

Branch/Commit: 0001941

Reviewer: Volker Braun

Issue created by migration from https://trac.sagemath.org/ticket/17131

@jdemeyer jdemeyer added this to the sage-6.4 milestone Oct 11, 2014
@jdemeyer
Copy link
Author

Branch: u/jdemeyer/ticket/17131

@jdemeyer
Copy link
Author

Author: Jeroen Demeyer

@jdemeyer
Copy link
Author

New commits:

0001941Improve accuracy of polytopes.regular_polygon()

@jdemeyer
Copy link
Author

Commit: 0001941

@jdemeyer

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Oct 11, 2014

Reviewer: Volker Braun

@vbraun
Copy link
Member

vbraun commented Oct 11, 2014

comment:4

Yes, this is all ancient cruft...

@vbraun
Copy link
Member

vbraun commented Oct 12, 2014

Changed branch from u/jdemeyer/ticket/17131 to 0001941

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants