# Question:Wrong values for Eigenvalues, depending on Digits and datatype

## Question:Wrong values for Eigenvalues, depending on Digits and datatype

Maple 2018

Hello!

I want to calculate Eigenvalues. Depending on values for digits and which datatype I choose Maple sometimes returns zero as Eigenvalues. Maybe there is a problem with the used routines: CLAPACK sw_dgeevx_, CLAPACK sw_zgeevx_.

 >

Problems LinearAlgebra:-Eigenvalues, Digits, ':-datatype' = ':-sfloat', ':-datatype' = ':-complex'( ':-sfloat' )

 > restart;
 > interface( ':-displayprecision' = 5 ):
 > infolevel['LinearAlgebra'] := 5; myPlatform := kernelopts( ':-platform' ); myVersion := kernelopts( ':-version' );
 (1.1)

Example 1

 > A1 := Matrix( 5, 5, [[0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1], [-10201/1000, 30199/10000, -5049/250, 97/50, -48/5]] );
 (1.1.1)
 > LinearAlgebra:-Eigenvalues( A1 );
 CharacteristicPolynomial: working on determinant of minor 2 CharacteristicPolynomial: working on determinant of minor 3 CharacteristicPolynomial: working on determinant of minor 4 CharacteristicPolynomial: working on determinant of minor 5
 (1.1.2)
 > A11 := Matrix( op( 1, A1 ),( i,j ) -> evalf( A1[i,j] ), ':-datatype' = ':-sfloat' );
 (1.1.3)
 > Digits := 89; LinearAlgebra:-Eigenvalues( A11 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.1.4)
 > Digits := 90; LinearAlgebra:-Eigenvalues( A11 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.1.5)
 > A12 := Matrix( op( 1, A1 ),( i,j ) -> evalf( A1[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );
 (1.1.6)
 > Digits := 100; LinearAlgebra:-Eigenvalues( A12 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.1.7)
 > Digits := 250; LinearAlgebra:-Eigenvalues( A12 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.1.8)
 >
 >

Example 2

 > A2 := Matrix(3, 3, [[0, 1, 0], [0, 0, 1], [3375, -675, 45]]);
 (1.2.1)
 > LinearAlgebra:-Eigenvalues( A2 );
 IntegerCharacteristicPolynomial: Computing characteristic polynomial for a 3 x 3 matrix IntegerCharacteristicPolynomial: Using prime 33554393 IntegerCharacteristicPolynomial: Using prime 33554383 IntegerCharacteristicPolynomial: Used total of  2  prime(s)
 (1.2.2)
 > A21 := Matrix( op( 1, A2 ),( i,j ) -> evalf( A2[i,j] ), ':-datatype' = ':-sfloat' );
 (1.2.3)
 > Digits := 77; LinearAlgebra:-Eigenvalues( A21 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.2.4)
 > Digits := 78; LinearAlgebra:-Eigenvalues( A21 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.2.5)
 > A22 := Matrix( op( 1, A2 ),( i,j ) -> evalf( A2[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );
 (1.2.6)
 > Digits := 58; LinearAlgebra:-Eigenvalues( A22 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.2.7)
 > Digits := 59; LinearAlgebra:-Eigenvalues( A22 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.2.8)
 >
 >

Example 3

 > A3 := Matrix(4, 4, [[0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1], [-48841, 8840, -842, 40]]);
 (1.3.1)
 > LinearAlgebra:-Eigenvalues( A3 );
 IntegerCharacteristicPolynomial: Computing characteristic polynomial for a 4 x 4 matrix IntegerCharacteristicPolynomial: Using prime 33554393 IntegerCharacteristicPolynomial: Using prime 33554383 IntegerCharacteristicPolynomial: Used total of  2  prime(s)
 (1.3.2)
 > A31 := Matrix( op( 1, A3 ),( i,j ) -> evalf( A3[i,j] ), ':-datatype' = ':-sfloat' );
 (1.3.3)
 > Digits := 75; LinearAlgebra:-Eigenvalues( A31 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.3.4)
 > Digits := 76; LinearAlgebra:-Eigenvalues( A31 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.3.5)
 > A32 := Matrix( op( 1, A3 ),( i,j ) -> evalf( A3[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );
 (1.3.6)
 > Digits := 100; LinearAlgebra:-Eigenvalues( A32 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.3.7)
 > Digits := 250; LinearAlgebra:-Eigenvalues( A32 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.3.8)
 >
 >

Example 4

 > A4 := Matrix(8, 8, [[0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1], [-1050625/20736, 529925/1296, -15417673/10368, 3622249/1296, -55468465/20736, 93265/108, -1345/8, 52/3]]);
 (1.4.1)
 > LinearAlgebra:-Eigenvalues( A4 );
 CharacteristicPolynomial: working on determinant of minor 2 CharacteristicPolynomial: working on determinant of minor 3 CharacteristicPolynomial: working on determinant of minor 4 CharacteristicPolynomial: working on determinant of minor 5 CharacteristicPolynomial: working on determinant of minor 6 CharacteristicPolynomial: working on determinant of minor 7 CharacteristicPolynomial: working on determinant of minor 8
 (1.4.2)
 > A41 := Matrix( op( 1, A4 ),( i,j ) -> evalf( A4[i,j] ), ':-datatype' = ':-sfloat' );
 (1.4.3)
 > Digits := 74; LinearAlgebra:-Eigenvalues( A41 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.4.4)
 > Digits := 75; LinearAlgebra:-Eigenvalues( A41 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_dgeevx_
 (1.4.5)
 > A42 := Matrix( op( 1, A4 ),( i,j ) -> evalf( A4[i,j] ), ':-datatype' = ':-complex'( ':-sfloat' ) );
 (1.4.6)
 > Digits := 100; LinearAlgebra:-Eigenvalues( A42 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.4.7)
 > Digits := 250; LinearAlgebra:-Eigenvalues( A42 );
 Eigenvalues: calling external function Eigenvalues: initializing the output object Eigenvalues: using software external library Eigenvalues: CLAPACK sw_zgeevx_
 (1.4.8)
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >