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

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

[Octave-bug-tracker] [bug #38760] Single data type complex diagonal matr


From: anonymous
Subject: [Octave-bug-tracker] [bug #38760] Single data type complex diagonal matrices are not correctly recognized in the OCT file.
Date: Wed, 17 Apr 2013 15:05:15 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0

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

                 Summary: Single data type complex diagonal matrices are not
correctly recognized in the OCT file.
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 17 Apr 2013 03:05:13 PM UTC
                Category: Libraries
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Zdenek Prusa
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

Hi,
I am using mingw 32bit build of Octave on 64bit windows 7.

Consider this code snippet:

#include <octave/oct.h>

DEFUN_DLD (bugsingle, args, nargout,
           "Reproducing the single complex diag. matrix bug. \n")
{

    if(args(0).is_complex_type())
    {
       if(args(0).is_single_type())
       {
          octave_stdout << "Input is complex single." << "\n";
       }
       else if(args(0).is_double_type())
       {
          octave_stdout << "Input is complex double." << "\n" ;
       }
    }
    return octave_value_list();
}


Calling it from octave results in:

Correct output:

octave:10> bugsingle(single(ones(3)*i))
Input is complex single.

Incorrect output:

octave:11> bugsingle(single(eye(3)*i))
Input is complex double.


I suspect there is something wrong with the specialized classes for the
diagonal matrices, but I am not able to track that down. Sorry.




    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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