Re: [sage-support] weird comparison of rational numbers

2012-10-19 Thread Volker Braun
On Friday, October 19, 2012 3:57:42 AM UTC+1, William wrote: > I don't know when we'll switch Sage to Python 3... maybe in a year or so. Isn't the major missing piece matplotlib? They recently released 1.2.0.rc2 so the next stable release (which will bring py3 compatibility) is just around the

Re: [sage-support] weird comparison of rational numbers

2012-10-19 Thread William Stein
On Fri, Oct 19, 2012 at 5:42 AM, Dima Pasechnik wrote: > > > On Friday, 19 October 2012 05:13:55 UTC+8, Ken Ribet wrote: >> >> Thanks to everyone for the explanation of why my comparison of rational >> numbers did not work. I'd like to make two comments: >> >> 1. I got into this mess by trying to

Re: [sage-support] weird comparison of rational numbers

2012-10-19 Thread Dima Pasechnik
On Friday, 19 October 2012 05:13:55 UTC+8, Ken Ribet wrote: > > Thanks to everyone for the explanation of why my comparison of rational > numbers did not work. I'd like to make two comments: > > 1. I got into this mess by trying to count points above and below the line > in the standard textbo

Re: [sage-support] weird comparison of rational numbers

2012-10-18 Thread William Stein
On Thu, Oct 18, 2012 at 2:13 PM, Ken Ribet wrote: > Thanks to everyone for the explanation of why my comparison of rational > numbers did not work. I'd like to make two comments: > > 1. I got into this mess by trying to count points above and below the line > in the standard textbook proof of qu

Re: [sage-support] weird comparison of rational numbers

2012-10-18 Thread Ken Ribet
Thanks to everyone for the explanation of why my comparison of rational numbers did not work. I'd like to make two comments: 1. I got into this mess by trying to count points above and below the line in the standard textbook proof of quadratic reciprocity. You have two odd primes p and q, mak

Re: [sage-support] weird comparison of rational numbers

2012-10-18 Thread William Stein
On Thu, Oct 18, 2012 at 7:00 AM, Kenneth A. Ribet wrote: > Hi Sage Gurus, > > Am I doing something stupid here: > > sage: print 1/2 < 3/7 > sage: L=[] > sage: for i in range(2,3): > ... for j in range(1,2): > Use [a..b] (or srange(a,b+1)) instead of range(a,b+1)... William > ...

Re: [sage-support] weird comparison of rational numbers

2012-10-18 Thread Alastair Irving
On 18/10/2012 15:00, Kenneth A. Ribet wrote: Hi Sage Gurus, Am I doing something stupid here: sage: print 1/2 < 3/7 sage: L=[] sage: for i in range(2,3): ... for j in range(1,2): ... L.append([i,j]) ... sage: print L sage: for P in L: ... print P[1], P[0] ... P[1]/P[

[sage-support] weird comparison of rational numbers

2012-10-18 Thread Kenneth A. Ribet
Hi Sage Gurus, Am I doing something stupid here: sage: print 1/2 < 3/7 sage: L=[] sage: for i in range(2,3): ... for j in range(1,2): ... L.append([i,j]) ... sage: print L sage: for P in L: ... print P[1], P[0] ... P[1]/P[0] < 3/7 False [[2, 1]] 1 2 True In plai