summaryrefslogtreecommitdiffstats
path: root/scilab/modules/ast/tests/nonreg_tests/bug_15781.dia.ref
blob: 938576f4137558396d787331e892efac91541b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Copyright (C) 2019 - St├ęphane MOTTELET
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
//
// <-- CLI SHELL MODE -->
//
// <-- Non-regression test for bug 15781 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/15781
//
// <-- Short Description -->
// display of complex matrix is ugly.
n=4
 n  = 
   4.
a=testmatrix("magic",4);
for f = ["v","e"]
    format(f)
    x=complex(cos(a),sin(a));
    x(3,3)=%nan;
    x(4,4)=%inf;
    x(2,1:2)=1+%i;
    x(:,1)=0;
    disp(x)
    for i=1:n
        disp(x(i,:))
        disp(" ")
    end
    for i=1:n
        disp(x(:,i))
        disp(" ")
    end
    x=x-x;
    disp(x)
    disp(" ")
    acoth(-2:0.5:2).'
end
         column 1 to 3
   0. + 0.i  -0.4161468 + 0.9092974i  -0.9899925 + 0.14112i  
   0. + 0.i   1.        + i           -0.8390715 - 0.5440211i
   0. + 0.i   0.7539023 + 0.6569866i   Nan       + 0.i       
   0. + 0.i   0.1367372 + 0.9906074i  -0.7596879 + 0.6502878i
         column 4
   0.9074468 + 0.420167i
  -0.1455    + 0.9893582i
   0.843854  - 0.5365729i
   Inf       + 0.i      
         column 1 to 3
   0. + 0.i  -0.4161468 + 0.9092974i  -0.9899925 + 0.14112i
         column 4
   0.9074468 + 0.420167i
  " "
   0. + 0.i   1. + i    -0.8390715 - 0.5440211i  -0.1455 + 0.9893582i
  " "
   0. + 0.i   0.7539023 + 0.6569866i   Nan + 0.i   0.843854 - 0.5365729i
  " "
   0. + 0.i   0.1367372 + 0.9906074i  -0.7596879 + 0.6502878i   Inf + 0.i
  " "
   0.
   0.
   0.
   0.
  " "
  -0.4161468 + 0.9092974i
   1.        + i         
   0.7539023 + 0.6569866i
   0.1367372 + 0.9906074i
  " "
  -0.9899925 + 0.14112i  
  -0.8390715 - 0.5440211i
   Nan       + 0.i       
  -0.7596879 + 0.6502878i
  " "
   0.9074468 + 0.420167i
  -0.1455    + 0.9893582i
   0.843854  - 0.5365729i
   Inf       + 0.i      
  " "
   0. + 0.i   0. + 0.i   0.  + 0.i   0.  + 0.i
   0. + 0.i   0. + 0.i   0.  + 0.i   0.  + 0.i
   0. + 0.i   0. + 0.i   Nan + 0.i   0.  + 0.i
   0. + 0.i   0. + 0.i   0.  + 0.i   Nan + 0.i
  " "
 ans  =
  -0.5493061 + 0.i       
  -0.804719  + 0.i       
  -Inf       - 1.5707963i
  -0.5493061 - 1.5707963i
   0.        - 1.5707963i
   0.5493061 - 1.5707963i
   Inf       + Nani      
   0.804719  + 3.1415927i
   0.5493061 + 3.1415927i
         column 1 to 3
   0.000D+00 + 0.000D+00i  -4.161D-01 + 9.093D-01i  -9.900D-01 + 1.411D-01i
   0.000D+00 + 0.000D+00i   1.000D+00 + 1.000D+00i  -8.391D-01 - 5.440D-01i
   0.000D+00 + 0.000D+00i   7.539D-01 + 6.570D-01i   Nan       + 0.000D+00i
   0.000D+00 + 0.000D+00i   1.367D-01 + 9.906D-01i  -7.597D-01 + 6.503D-01i
         column 4
   9.074D-01 + 4.202D-01i
  -1.455D-01 + 9.894D-01i
   8.439D-01 - 5.366D-01i
   Inf       + 0.000D+00i
         column 1 to 3
   0.000D+00 + 0.000D+00i  -4.161D-01 + 9.093D-01i  -9.900D-01 + 1.411D-01i
         column 4
   9.074D-01 + 4.202D-01i
  " "
         column 1 to 3
   0.000D+00 + 0.000D+00i   1.000D+00 + 1.000D+00i  -8.391D-01 - 5.440D-01i
         column 4
  -1.455D-01 + 9.894D-01i
  " "
         column 1 to 3
   0.000D+00 + 0.000D+00i   7.539D-01 + 6.570D-01i   Nan + 0.000D+00i
         column 4
   8.439D-01 - 5.366D-01i
  " "
         column 1 to 3
   0.000D+00 + 0.000D+00i   1.367D-01 + 9.906D-01i  -7.597D-01 + 6.503D-01i
         column 4
   Inf + 0.000D+00i
  " "
   0.000D+00
   0.000D+00
   0.000D+00
   0.000D+00
  " "
  -4.161D-01 + 9.093D-01i
   1.000D+00 + 1.000D+00i
   7.539D-01 + 6.570D-01i
   1.367D-01 + 9.906D-01i
  " "
  -9.900D-01 + 1.411D-01i
  -8.391D-01 - 5.440D-01i
   Nan       + 0.000D+00i
  -7.597D-01 + 6.503D-01i
  " "
   9.074D-01 + 4.202D-01i
  -1.455D-01 + 9.894D-01i
   8.439D-01 - 5.366D-01i
   Inf       + 0.000D+00i
  " "
         column 1 to 3
   0.000D+00 + 0.000D+00i   0.000D+00 + 0.000D+00i   0.000D+00 + 0.000D+00i
   0.000D+00 + 0.000D+00i   0.000D+00 + 0.000D+00i   0.000D+00 + 0.000D+00i
   0.000D+00 + 0.000D+00i   0.000D+00 + 0.000D+00i   Nan       + 0.000D+00i
   0.000D+00 + 0.000D+00i   0.000D+00 + 0.000D+00i   0.000D+00 + 0.000D+00i
         column 4
   0.000D+00 + 0.000D+00i
   0.000D+00 + 0.000D+00i
   0.000D+00 + 0.000D+00i
   Nan       + 0.000D+00i
  " "
 ans  =
  -5.493D-01 + 0.000D+00i
  -8.047D-01 + 0.000D+00i
  -Inf       - 1.571D+00i
  -5.493D-01 - 1.571D+00i
   0.000D+00 - 1.571D+00i
   5.493D-01 - 1.571D+00i
   Inf       + Nani      
   8.047D-01 + 3.142D+00i
   5.493D-01 + 3.142D+00i