Best search algorithm to find condition within a range

jonas.thornvall at gmail.com jonas.thornvall at gmail.com
Thu Apr 9 11:12:31 EDT 2015


Den torsdag 9 april 2015 kl. 17:02:24 UTC+2 skrev Chris Angelico:
> On Fri, Apr 10, 2015 at 12:53 AM, Alain Ketterlin
> <alain at dpt-info.u-strasbg.fr> wrote:
> > Ouch, you're right, I tried to stick with Marko's example and forgot the
> > basics. I meant "signed ints", but the "removable" condition should be
> > something like:
> >
> >     if ( x>0 && y>0 && z<x )
> >         ...
> >
> > i.e., some condition that is never true (either false or undefined).
> > Thanks for the correction.
> 
> Ah, yep. And yes, that's absolutely right - the compiler's allowed to
> treat that as never true.
> 
> ChrisA

I guess when working on highlevel arithmetic one does not need to think about such trivial? things, the expression is broken down into pairs fed into the functions and the parser handle the signs?



More information about the Python-list mailing list