Menu

Error using INV

Tom Lake
2014-07-13
2015-04-15
  • Tom Lake

    Tom Lake - 2014-07-13

    I can't figure out what's wrong with this program. Can anyone help?

    ~~~~~~~~
    a()=[3,7,3,0;0,2,-1,1;5,4,3,2;6,6,4,-1]
    b()=INV(a())
    PRINT DET(a())DET(b()) ! Result: 1
    PRINT DET(a()
    b()) ! Result: 1
    ~~~~~~~~~

    run
    illegal parameter type $3e
    unknown parameter type. -->$3e
    ERROR at line 2: ARRAY has the wrong type. Can not convert.
    illegal parameter type $3e
    unknown parameter type. -->$3e
    ERROR at line 2: ARRAY has the wrong type. Can not convert.
    0

     
  • Markus Hoffmann

    Markus Hoffmann - 2014-07-16

    The code looks fine, but it looks like you have discovered a bug in the interpreter. I assume it was version 1.23 (where I unfortunately have introduced some new bugs, which I am going to fix, as soon as I know about them. Release 1.23-06 still has this bug. Be patient!

     
  • Markus Hoffmann

    Markus Hoffmann - 2014-07-16

    I have found it. It was a typo in the code. Grummel...
    Version 1.23-07 will have that corrected.
    Testcode:

    a()=[3,7,3,0;0,2,-1,1;5,4,3,2;6,6,4,-1]
    b()=INV(a())
    dump
    print DET(a())    
    print DET(b())
    PRINT DET(a())*DET(b()) ! Result: 1
    PRINT DET(a()*b()) ! Result: 1
    

    Output:

    00: A(4,4) [0]
    01: B(4,4) [0]
    105
    0.00952380952381
    1
    1

     

    Last edit: Markus Hoffmann 2014-07-16
  • Markus Hoffmann

    Markus Hoffmann - 2014-07-17

    I release Version 1.23-5b for Windows. It should have that corrected.

    Note that most of the array functions still can not handle complex arrays, or arrays with big integers. I am working on that. Tell me what you need first.

     
    • Tom Lake

      Tom Lake - 2014-07-19

      I'd like all the array functions to work on any type of array that makes sense. If they work on reals, they should work on integers of any size, on complex numbers, too.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.