[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for n
From: |
Michael Leitner |
Subject: |
[Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers |
Date: |
Fri, 23 Mar 2018 03:56:44 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #2, bug #53434 (project octave):
Not so fast: didn't you read the documentation of isprime? It is clearly
stated that Octave's handling of non-positive values (including not only
negative, but also complex) is different from Matlab. So you can now argue
that this inconsistency has more drawbacks than advantages, and that the
function should be dumbed down to perform as Matlab, to be discussed by the
maintainers, but the case is not so clear as you seem to think. By the way,
your test seems to miss the case of complex numbers, as these are always
larger than zero (which, by the way, is the topic of another discussion,
whether it is a good idea to keep this Matlab incompatibility), and also the
case of non-scalar inputs (because the semantics of if imply all instead of
any for logical matrices). Thus the "contains" in the error message is in fact
correct.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53434>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers, Dildar Sk, 2018/03/23
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers, Dildar Sk, 2018/03/23
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers,
Michael Leitner <=
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers, Dildar Sk, 2018/03/23
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers, Dildar Sk, 2018/03/23
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers, Michael Leitner, 2018/03/23
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers, Dildar Sk, 2018/03/23
- [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers, Rik, 2018/03/23