On 02/09/2013 09:02 PM, Michael D. Godfrey wrote:
I looked a bit more at the "logical" tests as described in Sections
4.6-8.
If signbit() returned a logical it would fit with "isxxxx" functions and
make more
sense. Referencing Section 4.6 through 4.8 in the signbit()
documentation
would then make this all fit together and more understandable.
Is this a useful idea?
The signbit function in Octave is just a simple wrapper around the
system library signbit function, and that returns the value of the
sign bit as an integer. I don't know whether it would be a good idea
to change that definition for Octave. The other function that I know
of in Matlab that returns something different from what the C library
function returns is strcmp. So there is precedent for that kind of
thing. Or, if you want a predicate-style function, maybe we should
have isnegative instead?
jwe