blob: 19eb54f450a623a75f44bae3e8a3c10d50d0d94b (
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
|
##
## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
## Copyright (C) 2006-2008 - INRIA - 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
##
##
Feel free to add everything you find useful for hArtes and the scilab2c tool.
/*
** Type definition
*/
We define types that way (but it can evolve in the future) :
I - Scalar
-----------
I.1 - Real
I.1.1 - Simple precision (float)
I.1.2 - Double precision (double)
I.2 - Complex
I.2.1 - Simple precision (float)
I.2.2 - Double precision (double)
I.3 - Integer (NOT IMPLEMENTED YET)
I.4 - Boolean (NOT IMPLEMENTED YET)
II - Matrix
------------
!! WARNING !!
Matrix are stored column ways.
Ex :
double M[4] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}
- If M has 2 lines and 3 columns :
M = [ 1.0 3.0 5.0 ]
[ 2.0 4.0 6.0 ]
- If M has 3 lines and 2 columns :
M = [ 1.0 4.0 ]
[ 2.0 5.0 ]
[ 3.0 6.0 ]
I.1 - Real
I.1.1 - Simple precision (float)
I.1.2 - Double precision (double)
I.2 - Complex
I.2.1 - Simple precision (float)
I.2.2 - Double precision (double)
I.3 - Integer (NOT IMPLEMENTED YET)
I.4 - Boolean (NOT IMPLEMENTED YET)
/*
** Functions Naming style
*/
We define this coding style for functions names :
<precision><function_name><variable_type>.
variable_type :
- 's' : Scalar
- 'a' : Matrix
precision :
- 's' : Real simple precision (float)
- 'd' : Real double precision (double)
- 'c' : Complex simple precision (float)
- 'z' : Complex double precision (double)
/*
** Transtyping functions
** FIXME : Add it into the users limitations.
*/
- acos(x) : Real input.
Return a Real value if x E [ -1 ; 1 ].
Return a Complex value if x E ] -inf ; -1 [ U ] 1 ; +inf [.
- acosh(x) : Real input.
Return a Real value if x E ] 1 ; +inf [.
Return a Complex value if x E ] -inf ; 1 ].
- asin(x) : Real input.
Return a Real value if x E [ -1 ; 1 ].
Return a Complex value if x E ] -inf ; -1 [ U ] 1 ; +inf [.
- atanh(x) : Real input.
Return a Real value if x E ] -1 ; 1[.
Return a Complex value if x E ] -inf ; -1 [ U ] 1 ; +inf [.
- log(x) : Real input.
Return a Real value if x E ] 0 ; +inf [
Return a Complex value if x E ] -inf ; 0 [
- log10(x) : Real input.
Return a Real value if x E ] 0 ; +inf [
Return a Complex value if x E ] -inf ; 0 [
- chol(A) : Complex input
The diagonal must be real;
|