blob: 42041925eade1b3a1920aca184c3fc53e001ffd9 (
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
|
//SCI2C: DEFAULT_PRECISION= FLOAT
function test_float_Spec()
disp(spec(45)) ; // d0Spec
disp(spec(4+3*%i)); // z0Spec
a = [1 2 3; -4 5 98 ; 7 8 5] ;
b = [1 2 3; -4 5 98 ; 7 -100000 5] ;
disp(spec(a));
disp(spec(b));
disp(spec(a*%i));
// 2 outputs
[aa bb] = spec(45) ; // d0Spec
disp(aa);
disp(bb);
[cc dd] = spec(4+3*%i); // z0Spec
disp(cc);
disp(dd);
a = [1 2 3; -4 5 98 ; 7 8 5] ;
b = [1 2 3; -4 5 98 ; 7 -100000 5] ;
[ee ff] = spec(a);
disp(ee);
disp(ff);
[gg hh] = spec(b);
disp(gg);
disp(hh);
[ii jj] = spec(a*%i);
disp(ii);
disp(jj);
endfunction
|