|
| From: | Colin Macdonald |
| Subject: | [Octave-bug-tracker] [bug #43041] isprime(7i) returns true |
| Date: | Thu, 21 Aug 2014 16:23:22 +0000 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 |
URL:
<http://savannah.gnu.org/bugs/?43041>
Summary: isprime(7i) returns true
Project: GNU Octave
Submitted by: cbm
Submitted on: Thu 21 Aug 2014 04:23:21 PM GMT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
isprime(4i) is false which I can live with :)
isprime(7i) gives true: it should either give false or raise an exception.
Matlab gives an error "All entries of X must be nonnegative integers."
---------------------
Our error message for isprime(-1) needs a tweak too:
"error: isprime: needs positive integers".
Should say "nonnegative integers"
---------------------
I might around to patching this but submitting the bug in case I don't!
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43041>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |