[Top][All Lists]

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

[Octave-bug-tracker] [bug #53690] incorrect test in delaunayn?

From: A.R. Burgers
Subject: [Octave-bug-tracker] [bug #53690] incorrect test in delaunayn?
Date: Wed, 18 Apr 2018 03:38:52 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0


                 Summary: incorrect test in delaunayn?
                 Project: GNU Octave
            Submitted by: arb
            Submitted on: Wed 18 Apr 2018 07:38:50 AM UTC
                Category: Octave Function
                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: 4.3.90
        Operating System: Any



delaunayn has this code fragment:

    X = pts(T(i,1:end-1),:) - pts(T(i,2:end),:);
    if (abs (det (X)) / sqrt (sumsq (X, 2)) < tol)
      idx(end+1) = i;

in the 2-D case X is a 2x2 matrix, sumsq(X,2) a [2x1] vector, det(X) a

The "if" is evaluated on a 2x1 vector of logicals. Shouldn't there be an all
or any, e.g.: 

if all(abs (det (X)) / sqrt (sumsq (X, 2)) < tol))

See also https://savannah.gnu.org/bugs/?53689


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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