[bug #68300] blkdiag with arguments of type single returns result of type double

Fernando <[email protected]> Fri, 1 May 2026 17:55:01 -0400 (EDT)
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

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

                 Summary: blkdiag with arguments of type single returns result
of type double
                   Group: GNU Octave
               Submitter: tutissanalio
               Submitted: Fri 01 May 2026 09:54:57 PM 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: Unlocked
                 Release: dev
        Operating System: Any
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 01 May 2026 09:54:57 PM UTC By: Fernando <tutissanalio>

octave:29> A=single(ones(2))
A =
   1   1
   1   1

octave:30> B=blkdiag(A,A)
B =
   1   1   0   0
   1   1   0   0
   0   0   1   1
   0   0   1   1

octave:31> whos
Variables visible from the current scope:

variables in scope: top scope

  Attr   Name        Size                     Bytes  Class
  ====   ====        ====                     =====  ===== 
         A           2x2                         16  single
         B           4x4                        128  double

Total is 20 elements using 144 bytes


B is of type double instead of single.







    _______________________________________________________

Reply to this item at:

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

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCafUhNQAKCRCqLAuaBUf3
Tkg8AP9284nUXPWAjfDPVXqkp7yjKIy4AX1ymBSBomc6fAMYdAD8D6Zhz0Ugw2Sz
3xPOBIGH7ItNsPKFDkPDJ7dhLxAI/Qk=
=mZOK
-----END PGP SIGNATURE-----