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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #53425] factor.m: Octave producing neither err


From: Rik
Subject: [Octave-bug-tracker] [bug #53425] factor.m: Octave producing neither error nor correct result
Date: Fri, 23 Mar 2018 12:20:06 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #3, bug #53425 (project octave):

Again, Octave tries to be a superset of Matlab.  We could simply emit an
error, as Matlab does.  Alternatively, for negative integers (-N) we could
produce factor (N) and then reverse the sign of the first factor.  Sample
code:


neg_q = false;
if (q < 0)
  neg_q = true;
  q = -q;
endif

...
normal algorithm
...

if (neg_q)
  pf(1) = -pf(1);
endif


I'm not a number theory person so I don't know which option is preferred.  You
could ask on the Octave-Maintainers list and maybe that is someone's area of
expertise.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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