summaryrefslogtreecommitdiff
path: root/tests/unit_tests/double/test_Expm.sci.dia.ref
blob: c093cd7c7aa021ed34b8a00926172b515bab8b34 (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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
//
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2010-2010 - DIGITEO - Bruno JOFRET
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution.  The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
//
//
// <-- ENGLISH IMPOSED -->
// <-- JVM NOT MANDATORY -->
global SCI2CHOME;
scilab2c(SCI2CHOME+"/tests/unit_tests/double/test_Expm.sci", TMPDIR);
 
 -----------------------------------   
 
 --- Executing your SCILAB code. ---   
 
 -----------------------------------   
 
   1.0D+14 *
 
    3.5232353    3.9897442    4.4562531    4.922762   
    8.1403247    9.2181789    10.296033    11.373887  
    12.757414    14.446614    16.135813    17.825012  
    17.374503    19.675048    21.975593    24.276138  
 
 
         column 1 to 2
 
  - 0.0723612 - 0.5749056i  - 0.5876033 - 0.3357227i  
  - 0.5347368 - 0.3508537i    0.6385973 - 0.2744886i  
    0.0028876 - 0.1268019i  - 0.1352022 - 0.2132544i  
    0.5405119 + 0.0972500i    0.0909984 - 0.1520203i  
 
         column 3 to 4
 
  - 0.1028454 - 0.0965399i    0.3819125 + 0.1426430i  
  - 0.1880687 - 0.1981234i  - 0.0147346 - 0.1217582i  
    0.7267081 - 0.2997069i  - 0.4113816 - 0.3861595i  
  - 0.3585152 - 0.4012905i    0.1919713 - 0.6505607i  
 
 ------------------------------------------   
 
 --- End Execution of your SCILAB code. ---   
 
 ------------------------------------------   
 
          ==> SCI2C hArtes/POLIBA Tool!!!   
 
 Removing directory: TMPDIR/SCI2CTmpResultsReports   
 
 Removing directory: TMPDIR   
 
          ==> Initialize SCI2C and USER2C Libraries.   
 
          ==> Load SCI2C and USER2C Libraries.   
 
          ==> Start translation of function "test_Expm"   
Warning: file 'TMPDIR/SCI2CTmpResultsReports/test_Expm/test_Expm_copy.sci' already opened in Scilab.
Warning: file 'TMPDIR/SCI2CTmpResultsReports/test_Expm/test_Expm_copy.sci' already opened in Scilab.
 
          ==> Generate the AST.   
 
          ==> Generate C code in TMPDIR/main.c   
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:  b = [1 2 3 4 ; 5 6 7 8 ; 9 10 11 12 ; 13 14 15 16];   
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:  c = b*%i ;   
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:    
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:  disp(expm(b));   
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:  disp(expm(c));   
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:    
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:    
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C: endfunction   
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:    
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
    /*SCI2C: ########################################################## 
      ########                                                          
 
      SCI2C:    
 
      SCI2C: ########################################################## 
      ########*/                                                        
 
          ==> Copying sources   
 
          ==> Copying headers   
 
          ==> Copying interfaces   
 
          ==> Generating Builder TMPDIR/Makefile   
 
          ==> Translation Successfully Completed!!!   
fd = mopen(TMPDIR+"/main.c");
mgetl(fd)
 ans  =
 
!/*                                                                    !
!                                                                      !
!** ************************************************                   !
!                                                                      !
!** This file has been generated using                                 !
!                                                                      !
!**      Scilab2C (Version 2.0)                                        !
!                                                                      !
!**                                                                    !
!                                                                      !
!** Please visit following links for more informations:                !
!                                                                      !
!** Atoms Module: http://atoms.scilab.org/toolboxes/scilab2c           !
!                                                                      !
!** Scilab2C Forge: http://forge.scilab.org/index.php/p/scilab2c/      !
!                                                                      !
!** Scilab2C ML: http://forge.scilab.org/index.php/p/scilab2c/         !
!                                                                      !
!** ************************************************                   !
!                                                                      !
!*/                                                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!/*                                                                    !
!                                                                      !
!** -----------------                                                  !
!                                                                      !
!** --- Includes. ---                                                  !
!                                                                      !
!** -----------------                                                  !
!                                                                      !
!*/                                                                    !
!                                                                      !
!#include "main.h"                                                     !
!                                                                      !
!/*                                                                    !
!                                                                      !
!** ---------------------                                              !
!                                                                      !
!** --- End Includes. ---                                              !
!                                                                      !
!** ---------------------                                              !
!                                                                      !
!*/                                                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!/*                                                                    !
!                                                                      !
!** -------------------------------------                              !
!                                                                      !
!** --- Global Variables Declaration. ---                              !
!                                                                      !
!** -------------------------------------                              !
!                                                                      !
!*/                                                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!/*                                                                    !
!                                                                      !
!** -----------------------------------------                          !
!                                                                      !
!** --- End Global Variables Declaration. ---                          !
!                                                                      !
!** -----------------------------------------                          !
!                                                                      !
!*/                                                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!/*                                                                    !
!                                                                      !
!  SCI2C: -------------------------------------------------------------!
!     -----                                                            !
!                                                                      !
!  SCI2C: function test_Expm()                                         !
!                                                                      !
!  SCI2C: -------------------------------------------------------------!
!     -----                                                            !
!                                                                      !
!*/                                                                    !
!                                                                      !
!int main()                                                            !
!                                                                      !
!{                                                                     !
!                                                                      !
!/*                                                                    !
!                                                                      !
!** -----------------------------                                      !
!                                                                      !
!** --- Variable Declaration. ---                                      !
!                                                                      !
!** -----------------------------                                      !
!                                                                      !
!*/                                                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp1[1 * 2];                                             !
!                                                                      !
!   int ____temp1Size[2] = {1, 2};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp2[1 * 3];                                             !
!                                                                      !
!   int ____temp2Size[2] = {1, 3};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp3[1 * 4];                                             !
!                                                                      !
!   int ____temp3Size[2] = {1, 4};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp4[1 * 2];                                             !
!                                                                      !
!   int ____temp4Size[2] = {1, 2};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp5[1 * 3];                                             !
!                                                                      !
!   int ____temp5Size[2] = {1, 3};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp6[1 * 4];                                             !
!                                                                      !
!   int ____temp6Size[2] = {1, 4};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp7[2 * 4];                                             !
!                                                                      !
!   int ____temp7Size[2] = {2, 4};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp8[1 * 2];                                             !
!                                                                      !
!   int ____temp8Size[2] = {1, 2};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp9[1 * 3];                                             !
!                                                                      !
!   int ____temp9Size[2] = {1, 3};;                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp10[1 * 4];                                            !
!                                                                      !
!   int ____temp10Size[2] = {1, 4};;                                   !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp11[3 * 4];                                            !
!                                                                      !
!   int ____temp11Size[2] = {3, 4};;                                   !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp12[1 * 2];                                            !
!                                                                      !
!   int ____temp12Size[2] = {1, 2};;                                   !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp13[1 * 3];                                            !
!                                                                      !
!   int ____temp13Size[2] = {1, 3};;                                   !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp14[1 * 4];                                            !
!                                                                      !
!   int ____temp14Size[2] = {1, 4};;                                   !
!                                                                      !
!                                                                      !
!                                                                      !
!   double b[4 * 4];                                                   !
!                                                                      !
!   int __bSize[2] = {4, 4};;                                          !
!                                                                      !
!                                                                      !
!                                                                      !
!   doubleComplex c[4 * 4];                                            !
!                                                                      !
!   int __cSize[2] = {4, 4};;                                          !
!                                                                      !
!                                                                      !
!                                                                      !
!   double __temp15[4 * 4];                                            !
!                                                                      !
!   int ____temp15Size[2] = {4, 4};;                                   !
!                                                                      !
!                                                                      !
!                                                                      !
!   double ans1;                                                       !
!                                                                      !
!                                                                      !
!                                                                      !
!   doubleComplex __temp16[4 * 4];                                     !
!                                                                      !
!   int ____temp16Size[2] = {4, 4};;                                   !
!                                                                      !
!                                                                      !
!                                                                      !
!   double ans2;                                                       !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!                                                                      !
!/*                                                                    !
!                                                                      !
!** ---------------------------------                                  !
!                                                                      !
!** --- End Variable Declaration. ---                                  !
!                                                                      !
!** ---------------------------------                                  !
!                                                                      !
!*/                                                                    !
!                                                                      !
!/*                                                                    !
!                                                                      !
!** ---------------                                                    !
!                                                                      !
!** --- C code. ---                                                    !
!                                                                      !
!** ---------------                                                    !
!                                                                      !
!*/                                                                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:  b = [1 2 3 4 ; 5 6 7 8 ; 9 10 11 12 ; 13 14 15 16];      !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!   d0d0OpRcd2(1,2,__temp1);                                           !
!                                                                      !
!   d2d0OpRcd2(__temp1,  ____temp1Size,3,__temp2);                     !
!                                                                      !
!   d2d0OpRcd2(__temp2,  ____temp2Size,4,__temp3);                     !
!                                                                      !
!   d0d0OpRcd2(5,6,__temp4);                                           !
!                                                                      !
!   d2d0OpRcd2(__temp4,  ____temp4Size,7,__temp5);                     !
!                                                                      !
!   d2d0OpRcd2(__temp5,  ____temp5Size,8,__temp6);                     !
!                                                                      !
!   d2d2OpCcd2(__temp3,  ____temp3Size,__temp6,  ____temp6Size,__temp7)!
!     ;                                                                !
!                                                                      !
!   d0d0OpRcd2(9,10,__temp8);                                          !
!                                                                      !
!   d2d0OpRcd2(__temp8,  ____temp8Size,11,__temp9);                    !
!                                                                      !
!   d2d0OpRcd2(__temp9,  ____temp9Size,12,__temp10);                   !
!                                                                      !
!   d2d2OpCcd2(__temp7,  ____temp7Size,__temp10,  ____temp10Size,__temp!
!     11);                                                             !
!                                                                      !
!   d0d0OpRcd2(13,14,__temp12);                                        !
!                                                                      !
!   d2d0OpRcd2(__temp12,  ____temp12Size,15,__temp13);                 !
!                                                                      !
!   d2d0OpRcd2(__temp13,  ____temp13Size,16,__temp14);                 !
!                                                                      !
!   d2d2OpCcd2(__temp11,  ____temp11Size,__temp14,  ____temp14Size,b); !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:  c = b*%i ;                                               !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!   d2z0OpStarz2(b,  __bSize,DoubleComplex(0,1),c);                    !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:                                                           !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:  disp(expm(b));                                           !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!   d2expmd2(b,  __bSize,__temp15);                                    !
!                                                                      !
!   ans1 = d2dispd0(__temp15,  ____temp15Size);                        !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:  disp(expm(c));                                           !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!   z2expmz2(c,  __cSize,__temp16);                                    !
!                                                                      !
!   ans2 = z2dispd0(__temp16,  ____temp16Size);                        !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:                                                           !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:                                                           !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C: endfunction                                               !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:                                                           !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*                                                                 !
!                                                                      !
!   ** ---------------------                                           !
!                                                                      !
!   ** --- Free Section. ---                                           !
!                                                                      !
!   ** ---------------------                                           !
!                                                                      !
!   */                                                                 !
!                                                                      !
!   /*                                                                 !
!                                                                      !
!   ** -------------------------                                       !
!                                                                      !
!   ** --- End Free Section. ---                                       !
!                                                                      !
!   ** -------------------------                                       !
!                                                                      !
!   */                                                                 !
!                                                                      !
!                                                                      !
!                                                                      !
!   return(0);                                                         !
!                                                                      !
!                                                                      !
!                                                                      !
!   /*SCI2C: ##########################################################!
!     ########                                                         !
!                                                                      !
!     SCI2C:                                                           !
!                                                                      !
!     SCI2C: ##########################################################!
!     ########*/                                                       !
!                                                                      !
!}                                                                     !
!                                                                      !
!                                                                      !
mclose(fd);