On Sun, Jul 11, 2004 at 09:13:27AM -0700, Phil Carmody wrote:
--- math-fun-request@mailman.xmission.com wrote:
From: Marc LeBrun <mlb@fxpt.com> Subject: Re: [math-fun] perfect squares [snip] BTW I've shared RCS's interesting experience of the surprising messiness of such algorithms, such as determining whether p+qx < r+sx for signed p,q,r,s using only integer operations. Heck, I'd even pay $50 for an easy way to generate a+bx in increasing order for a,b >=0 (if you think you have one contact me to negotiate the definition of "easy"<;-).
Fool's errand, if I understand correctly.
For any terms p+qx < r+sx, there exists an u s.t. frac(qx) < frac(ux) < frac(sx) And therefore there exists a t, s.t. p+qx < t+ux < r+sx. (p,q,r,s,t,u integers, x irrational)
I think you missed the constraint 'a,b >= 0'. Peace, Dylan