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. [SNIP foolishness] I think you missed the constraint 'a,b >= 0'.
That I did. Ooops. Surely the easiest algorithm would be Dijkstra's? Very quick, very easy, and not requiring anything more than integer maths if you're paranoid about roundoff errors or are very tight on space. Your "same floor" algorithm may very well nearly be Dijkstra's already though. Phil ===== When inserting a CD, hold down shift to stop the AutoRun feature In the Device Manager, disable the SbcpHid device. http://www.cs.princeton.edu/~jhalderm/cd3/ __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail