octave-bug-tracker
[Top][All Lists]
Advanced

[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: Rik
Subject: [Octave-bug-tracker] [bug #53434] isprime.m:missing error, warning for negative numbers
Date: Fri, 23 Mar 2018 12:09:32 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Update of bug #53434 (project octave):

             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #7:

Octave generally views itself as a superset of Matlab.  If an Octave function
can do everything the equivalent Matlab function does, and also improve on it
by operating on a larger input domain, then we choose that course.

It may be of use mostly to number theoreticians, but there is such a thing as
"prime" for negative numbers so Octave implemented it.

The situation is not the same for the primes() function.  The implicit
definition of primes() is the the list of primes from 1 to the input N.  If N
is negative then the list is empty.  And for compatibility with Matlab, Octave
does not issue an error that the list is empty, it just returns an empty
list.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53434>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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