octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

short-circuit ops


From: Ed Meyer
Subject: short-circuit ops
Date: Sat, 29 Sep 2012 15:24:21 -0700

I'm taking the stanford machine learning course and in the forums there has
been some concern about a warning we get when we run a cg optimizer supplied
by the instructor. The messages are typically something like

   possible Matlab-style short-circuit operator at line 95, column 32

where the offending code is

       if isnan(z2) | isinf(z2)

and the warnings of course go away if I change | to ||
However, the current matlab doc says that single boolean ops
do not short-circuit, just like octave.  So I'm wondering if this warning should be
removed (I'd be happy to submit a patch)


--
Ed Meyer


reply via email to

[Prev in Thread] Current Thread [Next in Thread]