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
prime_pi.plot is wrong (!) #6811
Comments
comment:1
I've attached code to fix this bug. It does things right. (1) I created a plot_step_function command that can be used to plot general step functions, and added it to the reference manual. (2) I changed the current broken prime_pi.plot to use that and use a much easier to understand (hence right) algorithm to generate the plot. (3) I fixed a bunch of ReST mistakes in prime_pi.pyx while I was at it. (4) I added prime_pi to the reference manual. |
Attachment: trac_6811.patch.gz |
comment:2
Looks fine:
to
for readability.
a. If we are to make any changes to this, we would need to consider uneven intervals of definition (say the function
|
comment:3
Also, we need to fix the credit situation in prime_pi.pyx |
reviewer patch; fixes typos |
comment:4
Attachment: trac_6811-reviewer.patch.gz The reviewer patch |
comment:5
Merged both patches. |
Author: William Stein |
Merged: Sage 4.1.2.alpha0 |
Reviewer: R. Andrew Ohana, Minh Van Nguyen |
I was computed Riemann's analytic formula for pi(X), and was disturbed it wasn't converging to pi(X). It turned out that the function in Sage for a while for plotting prime_pi is buggy! For example, try this:
You'll see a plot that has a horizontal line at height 5 on it.
This is very bad and embarrassing!
Component: number theory
Author: William Stein
Reviewer: R. Andrew Ohana, Minh Van Nguyen
Merged: Sage 4.1.2.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/6811
The text was updated successfully, but these errors were encountered: