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

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

[Octave-bug-tracker] [bug #62664] assert makes function give wrong answe


From: anonymous
Subject: [Octave-bug-tracker] [bug #62664] assert makes function give wrong answer
Date: Thu, 23 Jun 2022 16:25:54 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?62664>

                 Summary: assert makes function give wrong answer
                 Project: GNU Octave
               Submitter: None
               Submitted: Thu 23 Jun 2022 08:25:52 PM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 7.1.0
         Discussion Lock: Any
        Operating System: Any


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 23 Jun 2022 08:25:52 PM UTC By: Anonymous
Function foo is like this.
```
function [out1, out2, out3, out4] = foo (in1, in1, in3, in4)
        out1 = in1;
        out2 = in2;
        out3 = in3;
        out4 = in4;
end
```

Calling `[y1, y2, y3, y4] = foo (x1, x2, x3, x4);` works properly.

But fails all unit testing.
```
assert (foo (1, 1, 1, 1) == [1 1 1 1])
```
Gives foo (1, 1, 1, 1) as [1 0 0 0] instead of [1 1 1 1]. So there must be a
bug in assert that gives the wrong answer.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62664>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

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