-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Labels
Milestone
Comments
Branch: u/jdemeyer/ticket/17131 |
Author: Jeroen Demeyer |
New commits:
|
Commit: |
This comment has been minimized.
This comment has been minimized.
Reviewer: Volker Braun |
comment:4
Yes, this is all ancient cruft... |
Changed branch from u/jdemeyer/ticket/17131 to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The function
polytopes.regular_polygon()
uses a hard-coded approximation ofpi
(3.14159265359) which has an error of 466 ulp. Moreover, it uses Pythonfloat
s instead ofRR
.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 fixedregular_polygon()
.Component: geometry
Author: Jeroen Demeyer
Branch/Commit:
0001941
Reviewer: Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/17131
The text was updated successfully, but these errors were encountered: