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

Follow-up Comment #5, bug #53434 (project octave):

To answer your previous question, because (-2+1i)*(-1-2i)=(4+3i), while for
8+3i no such factorization can be found, because if there were two Gaussian
integers that have the product 8+3i, their absolute values would need to have
the product sqrt(73). However, 73 is a prime number, and as the absolute value
of any Gaussian integer is the square root of an integer, one of these factors
would need to have an absolute value of 1. Thus 8+3i is prime. Or you just
believe the 19-th century number theoreticians.

To answer why it is not following Matlab: browse the source code to look when
this has been introduced. I just did this exercise for you, giving the result
that you should check the discussion at bug #43041. If this is dear to your
heart, you can try to see whether the consensus has changed in the meantime.

    _______________________________________________________

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]