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

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

[Octave-bug-tracker] [bug #43311] symbolic: Wrong expected value in symf


From: Rafael Laboissiere
Subject: [Octave-bug-tracker] [bug #43311] symbolic: Wrong expected value in symfsolve test
Date: Sun, 28 Sep 2014 00:07:33 +0000
User-agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36

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

                 Summary: symbolic: Wrong expected value in symfsolve test
                 Project: GNU Octave
            Submitted by: rlaboiss
            Submitted on: Sun 28 Sep 2014 12:07:32 AM GMT
                Category: Octave Forge Package
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

For some reason that I do not really understand, the last test in file
symfsolve.m is giving now (with Octave 3.8.2) a different result from what it
used to give before, even though the solution that is found is fully valid. 
This is perhaps due to recent changes in the fsolve function, which is in
Octave core.  Here is what I obtain now:


octave:1> symbols
octave:2> x = sym ("x");
octave:3> y = sym ("y");
octave:4> f = x ^ 2 + 3 * x - 1;
octave:5> g = x * y - y ^ 2 + 3;
octave:6> assert (symfsolve ({f, g}, {y==1,x==2}), [1.89004; 0.30278]',
1e-5);
error: ASSERT errors for:  assert (symfsolve ({f, g}, {y == 1, x ==
2}),[1.89004; 0.30278]',1e-5)

  Location  |  Observed  |  Expected  |  Reason
    (1)        -1.5873        1.89       Abs err 3.4773 exceeds tol 1e-05


The obvious fix is to change the test in inst/symfsolve.m to read:


%!assert (symfsolve ({f, g}, {y==1,x==2}), [-1.58727; 0.30278]', 1e-5);






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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