On Tue, Nov 25, 2003 at 12:08:37PM +0100, Lars Gullik Bj�nnes wrote:
> Andre Poenitz <[EMAIL PROTECTED]> writes:
> 
> | Yes:
> |                     !(a && b)                      !a || !b
> | a == 0, b == 0:   a. Wrong. Stop. Negate. True    !a. W. S. N. T
> | a == 0, b == 1:   a. Wrong. Stop. Negate. True    !a. W. S. N. T
> 
> yes... tired I guess... and since we are on this topic, I have
> forgotten the name of this transformation, can you remind me?
> 
> I found it: DeMorgan's Law.

Yes.

> | a == 1, b == 0:   a. Good. b Wrong. Negate. True  a Good. N. b. W. N. Or T
> | a == 1, b == 1:   a. Good. b good. Negate. False  a Good. N. b. G. N. Or F
> >
> >> I guess the (!a && !b) -> !(a || b) transmformation only holds if a
> >> and b are independant. That is not the case here.
> >
> | It also holds for short-cut evaluation.
> 
> You are right...  back to the original question... was my adding of
> !a && ... wrong?

I would think so (using || would make me feel better at least...) But
it somehow does not show up as obvious problem which raises the question
why this code is needed at all...

Andre'

Reply via email to