="Schroeppel, Richard" <rschroe@sandia.gov> I'm not sure if this qualifies as "easy", and it's got some annoying branches in the algorithm.
=Marc LeBrun I've shared RCS's interesting experience of the surprising messiness of such algorithms, such as determining whether p+qx < r+sx
=Eugene Salamin If p-r and s-q are of opposite sign or either is zero, ... while if they are both negative, change "<" to ">" ...
All these strange branches and cases are what I meant by "surprising messiness". Somehow it seems like there ought to be a simpler way to compute these kinds of things. Is there some "good reason" that arithmetic on p+qx expressions gets so complicated? (eg maybe there's some better representation than "rectangular coordinates"?)
=Marc LeBrun Heck, I'd even pay $50 for an easy way to generate a+bx in increasing order for a,b >=0
=Phil Carmody For any terms p+qx < r+sx, there exists an u s.t. frac(qx) < frac(ux) < frac(sx)
=Dylan Thurston I think you missed the constraint 'a,b >= 0'.
Aye, there's the rub.