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

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

[Octave-bug-tracker] [bug #32924] lcm yields wrong results


From: Cornelius
Subject: [Octave-bug-tracker] [bug #32924] lcm yields wrong results
Date: Mon, 28 Mar 2011 18:31:10 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Firefox/3.6; W-XP (.NET CLR 3.5.30729)

Follow-up Comment #8, bug #32924 (project octave):

The examples you bring up are
a) either wrong by about the numerical inaccuracy of the data representation
or
b) give as a result a value which is not a number even though it might not be
the correct one. (Would depend on the limit you are taking.) 
Whereas in this case the output looks like a perfectly valid result even
though it is of by orders of magnitude.
And this is neither du to incorrect input values nor giving integers which are
larger than a double as input values (lcm([26:52])).
The issues arises inside the function during the for loop and therefore it is
the responsibility of the function to warn the user.

FYI: In the exact same case Matlab issues the following warning:

Inputs contain values larger than the largest consecutive flint. Result may be
inaccurate.

Admittedly the warning is issued inside the gcd function which should also be
the case in octave considering how the lcm function is implemented.

P.S.: Please delete my previous 3 comments since they got badly mangled.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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