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

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

[Octave-bug-tracker] [bug #57305] @vpi/sum.m fails in octave (but not in


From: Alois Schlögl
Subject: [Octave-bug-tracker] [bug #57305] @vpi/sum.m fails in octave (but not in matlab)
Date: Tue, 26 Nov 2019 09:19:30 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

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

                 Summary: @vpi/sum.m fails in octave (but not in matlab)
                 Project: GNU Octave
            Submitted by: schloegl
            Submitted on: Tue 26 Nov 2019 02:19:29 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.1.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:


The VPI toolbox [1] (licensed with 2-clause BSD License) seems to work mostly
on octave, too. 
One problem is that the overloading of sum (@vpi/sum ) does not seem to work
on octave, it works on Matlab. 

In order to reproduce, download vpi from [1] or [2], unzip, and addpath; then
run

   demo_vpi

It fails with this error

        ...
        error: octave_base_value::permute (): wrong type argument 'class'
        error: called from
            sum at line 53 column 5
            demo_vpi at line 88 column 1


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

        variables in scope: top scope

           Attr Name        Size                     Bytes  Class
           ==== ====        ====                     =====  ===== 
                A           1x1                         24  vpi
                B           1x10                       664  vpi
                INT         1x1                       2536  vpi
                a           1x1                        232  vpi
                ans         1x1                         16  vpi
                p           1x1                          8  double

        Total is 15 elements using 3480 bytes

        octave:6> sum(B)
        error: octave_base_value::permute (): wrong type argument 'class'
        error: called from
            sum at line 53 column 5


I've tested this with octave 4.4.1 (from Debian/Buster) and 5.1.0 (compiled
from source some weeks ago). 
In case you do not have an account at matlabcentral, You can get vpi from here
[2], too. 
 

[1]
https://de.mathworks.com/matlabcentral/fileexchange/22725-variable-precision-integer-arithmetic
[2] https://pub.ist.ac.at/~schloegl/VariablePrecisionIntegers.zip
    sha256sum:
5a1639fc4e6d3e74dcec9add6e0aeeaf5eb5e1784db936a571d8123702397615 
VariablePrecisionIntegers.zip






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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