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

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

[Octave-bug-tracker] [bug #47363] nonlin_residmin: precision? ("optim" p


From: anonymous
Subject: [Octave-bug-tracker] [bug #47363] nonlin_residmin: precision? ("optim" package)
Date: Tue, 08 Mar 2016 15:56:41 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0

URL:
  <http://savannah.gnu.org/bugs/?47363>

                 Summary: nonlin_residmin: precision?  ("optim" package)
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Di 08 Mär 2016 15:56:40 UTC
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Inaccurate Result
                  Status: None
             Assigned to: None
         Originator Name: Michael
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.0
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Hello,

I tinkered with the nonlin_residmin function from the "optim" package. My goal
was to find the roots of a simple function; f(x) = x^2-2*x-5

Since nonlin-residmin uses residual minimisation, I did not define a cost
function and just defined f(x) as:

function out = f(x)
  out = x^2-2*x-5;
endfunction

1. One root of this function is at approx. x_root = 3.45, while its absolute
minimum is located at x_min = 1. When using x0=1.1 as a starting point,
nonlin_residmin finds the actual root at 3.45 (since the residual is almost
zero in this place).

2. When I use 1.0001 as the starting point, the residual shown is 6. However
this is f(x_min) and therefore the absolute minimum of the function but not
even close to either of the roots.

What I am wondering about is if nonlin_residmin already has problems because
of the gradient at 1.0001 being close to zero? One would expect that 1e-5
should not be an issue in terms of machine precision?

An example file is attached to this post. I am running Octave 4.0.0 on 64bit
Windows 7.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Di 08 Mär 2016 15:56:40 UTC  Name: test.m  Size: 390B   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=36571>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

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