|
From: | Cornelius |
Subject: | [Octave-bug-tracker] [bug #32924] lcm yields wrong results |
Date: | Mon, 28 Mar 2011 18:19:29 +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 #5, bug #32924 (project octave): The examples you bring up are a) either wrong in 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 my example the resulting value seems like a perfectly fine and possibly correct result even though it is by orders of magnitude of. This error is neither due to incorrect input values nor is any of the input values larger than what can be represented as a double ( lcm([26:52]) ). The issue only arises in the for loop inside the function and therefore it is the functions responsiblity 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 stems from the gcd function which it should in octave too considering the way the lcm function is implemented. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?32924> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |