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

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

[Octave-bug-tracker] [bug #33860] given test fail should consider calcul


From: Tatsuro MATSUOKA
Subject: [Octave-bug-tracker] [bug #33860] given test fail should consider calculation error
Date: Tue, 26 Jul 2011 02:14:04 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30

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

                 Summary: given test fail should consider calculation error 
                 Project: GNU Octave
            Submitted by: tmacchant
            Submitted on: 2011年07月26日 02時14分03秒
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Hello

In MinGW build of recent dev source, 


author  Rik <address@hidden>
Mon Jul 25 10:32:01 2011 -0700 (4 hours ago)
branch  stable
changeset 12882 724bb6b7e3d5
parent 12874    d5d3f04a645f


test for 'givens' gives


  ***** assert (givens (1,1), [1, 1; -1, 1]/sqrt(2));
!!!!! test failed
assert (givens (1, 1),[1, 1; -1, 1] / sqrt (2)) expected
   0.70711   0.70711
  -0.70711   0.70711
but got
   0.70711   0.70711
  -0.70711   0.70711
values do not match


However,


octave:9> format long
octave:10> givens(1,1)
ans =

   0.707106781186548   0.707106781186548
  -0.707106781186548   0.707106781186548

octave:11> [1, 1; -1, 1] / sqrt (2)
ans =

   0.707106781186547   0.707106781186547
  -0.707106781186547   0.707106781186547

octave:6> givens (1,1) - [1, 1; -1, 1] / sqrt (2)
ans =

  1.11022302462516e-016  1.11022302462516e-016
  -1.11022302462516e-016  1.11022302462516e-016



The test should consider calculation errors as,

assert(abs(givens (1,1) - [1, 1; -1, 1] / sqrt (2))< 2e-16);

Regards

Tatsuro







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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