Project

General

Profile

« Previous | Next » 

Revision e301f1fb

Added by Teme Kahsai over 6 years ago

missing files

View differences:

include/conv.h
1
/* C code generated by lustrec
2
   Version number 1.1-Unversioned directory
3
   Code is C99 compliant
4
   Using (double) floating-point numbers */
5
   
6
#ifndef _CONV
7
#define _CONV
8

  
9
/* Imports standard library */
10
#include "/Users/Teme/Documents/GitHub/lustrec/include/lustrec/arrow.h"
11

  
12

  
13
/* Import dependencies */
14

  
15
/* Types definitions */
16

  
17
/* Global constant (declarations, definitions are in C file) */
18

  
19
/* Structs declarations */
20

  
21
/* Nodes declarations */
22
extern double int_to_real (int in1
23
                           );
24

  
25
extern int real_to_int (double in1
26
                        );
27

  
28

  
29
#endif
30

  
include/math.h
1
/* C code generated by lustrec
2
   Version number 1.1-Unversioned directory
3
   Code is C99 compliant
4
   Using (double) floating-point numbers */
5
   
6
#ifndef _MATH
7
#define _MATH
8

  
9
/* Imports standard library */
10
#include "/Users/Teme/Documents/GitHub/lustrec/include/lustrec/arrow.h"
11

  
12

  
13
/* Import dependencies */
14

  
15
/* Types definitions */
16

  
17
/* Global constant (declarations, definitions are in C file) */
18

  
19
/* Structs declarations */
20

  
21
/* Nodes declarations */
22
extern double sqrt (double x
23
                    );
24

  
25
extern double sinh (double x
26
                    );
27

  
28
extern double sin (double x
29
                   );
30

  
31
extern double pow (double x, double n
32
                   );
33

  
34
extern double fabs (double x
35
                    );
36

  
37
extern double erf (double x
38
                   );
39

  
40
extern double ceil (double x
41
                    );
42

  
43
extern double cosh (double x
44
                    );
45

  
46
extern double cos (double x
47
                   );
48

  
49
extern double cbrt (double x
50
                    );
51

  
52
extern double atanh (double x
53
                     );
54

  
55
extern double atan2 (double x, double n
56
                     );
57

  
58
extern double atan (double x
59
                    );
60

  
61
extern double asinh (double x
62
                     );
63

  
64
extern double asin (double x
65
                    );
66

  
67
extern double acosh (double x
68
                     );
69

  
70
extern double acos (double x
71
                    );
72

  
73

  
74
#endif
75

  
include/mpfr_lustre.c
1
#include <mpfr.h>
2
#include "mpfr_lustre.h"
3

  
4
void MPFR_LUSTRE_INIT () {
5
  return;
6
}
7

  
8
void MPFR_LUSTRE_CLEAR () {
9
  return;
10
}
11

  
12
void MPFRNeq_step (mpfr_t i1, mpfr_t i2, 
13
                          _Bool (*out)
14
                          )
15
{
16
  *out = mpfr_lessgreater_p(i1, i2);
17
}
18

  
19
void MPFREq_step (mpfr_t i1, mpfr_t i2, 
20
                         _Bool (*out)
21
                         )
22
{
23
  *out = mpfr_equal_p(i1, i2);
24
}
25

  
26
void MPFRGt_step (mpfr_t i1, mpfr_t i2, 
27
                         _Bool (*out)
28
                         )
29
{
30
  *out = mpfr_greater_p(i1, i2);
31
}
32

  
33
void MPFRGe_step (mpfr_t i1, mpfr_t i2, 
34
                         _Bool (*out)
35
                         )
36
{
37
  *out = mpfr_greaterequal_p(i1, i2);
38
}
39

  
40
extern void MPFRLt_step (mpfr_t i1, mpfr_t i2, 
41
                         _Bool (*out)
42
                         )
43
{
44
  *out = mpfr_less_p(i1, i2);
45
}
46
void MPFRLe_step (mpfr_t i1, mpfr_t i2, 
47
                         _Bool (*out)
48
                         )
49
{
50
  *out = mpfr_lessequal_p(i1, i2);
51
}
52

  
53
void MPFRDiv_step (mpfr_t i1, mpfr_t i2, 
54
                          mpfr_t out
55
                          )
56
{
57
  mpfr_div(out, i1, i2, MPFR_RNDN);
58
}
59

  
60
void MPFRTimes_step (mpfr_t i1, mpfr_t i2, 
61
                            mpfr_t out
62
                            )
63
{
64
  mpfr_mul(out, i1, i2, MPFR_RNDN);
65
}
66

  
67
void MPFRMinus_step (mpfr_t i1, mpfr_t i2, 
68
                            mpfr_t out
69
                            )
70
{
71
  mpfr_sub(out, i1, i2, MPFR_RNDN);
72
}
73

  
74
void MPFRPlus_step (mpfr_t i1, mpfr_t i2, 
75
                           mpfr_t out
76
                           )
77
{
78
  mpfr_add(out, i1, i2, MPFR_RNDN);
79
}
80

  
81
void MPFRUminus_step (mpfr_t i, 
82
                             mpfr_t out
83
                             )
84
{
85
  mpfr_neg(out, i, MPFR_RNDN);
86
}
87

  
88
void MPFRInit(mpfr_t i, mpfr_prec_t prec)
89
{
90
  mpfr_init2(i, prec);
91
}
92

  
93
void MPFRClear(mpfr_t i)
94
{
95
  mpfr_clear(i);
96
}
include/mpfr_lustre.h
1
/* C code generated by lustrec
2
   Version number 1.1-Unversioned directory
3
   Code is C99 compliant
4
   Using MPFR multi-precision numbers */
5
   
6
#ifndef _MPFR_LUSTRE
7
#define _MPFR_LUSTRE
8

  
9
/* Imports standard library */
10
#include <mpfr.h>
11
#include "/Users/Teme/Documents/GitHub/lustrec/include/lustrec/arrow.h"
12

  
13

  
14
/* Import dependencies */
15

  
16
/* Types definitions */
17

  
18
/* Global constant (declarations, definitions are in C file) */
19

  
20
/* Global initialization declaration */
21
extern void MPFR_LUSTRE_INIT ();
22

  
23
/* Global clear declaration */
24
extern void MPFR_LUSTRE_CLEAR ();
25

  
26
/* Structs declarations */
27

  
28
/* Nodes declarations */
29
extern void MPFRNeq_step (mpfr_t i1, mpfr_t i2, 
30
                          _Bool (*out)
31
                          );
32

  
33
extern void MPFREq_step (mpfr_t i1, mpfr_t i2, 
34
                         _Bool (*out)
35
                         );
36

  
37
extern void MPFRGt_step (mpfr_t i1, mpfr_t i2, 
38
                         _Bool (*out)
39
                         );
40

  
41
extern void MPFRGe_step (mpfr_t i1, mpfr_t i2, 
42
                         _Bool (*out)
43
                         );
44

  
45
extern void MPFRLt_step (mpfr_t i1, mpfr_t i2, 
46
                         _Bool (*out)
47
                         );
48

  
49
extern void MPFRLe_step (mpfr_t i1, mpfr_t i2, 
50
                         _Bool (*out)
51
                         );
52

  
53
extern void MPFRDiv_step (mpfr_t i1, mpfr_t i2, 
54
                          mpfr_t out
55
                          );
56

  
57
extern void MPFRTimes_step (mpfr_t i1, mpfr_t i2, 
58
                            mpfr_t out
59
                            );
60

  
61
extern void MPFRMinus_step (mpfr_t i1, mpfr_t i2, 
62
                            mpfr_t out
63
                            );
64

  
65
extern void MPFRPlus_step (mpfr_t i1, mpfr_t i2, 
66
                           mpfr_t out
67
                           );
68

  
69
extern void MPFRUminus_step (mpfr_t i, 
70
                             mpfr_t out
71
                             );
72

  
73

  
74
#endif
75

  
include/mpfr_lustre.lusi
1

  
2

  
3
function MPFRUminus(i: real) returns (out: real) lib gmp lib mpfr;
4

  
5
function MPFRPlus(i1, i2: real) returns (out: real);
6

  
7
function MPFRMinus(i1, i2: real) returns (out: real);
8

  
9
function MPFRTimes(i1, i2: real) returns (out: real);
10

  
11
function MPFRDiv(i1, i2: real) returns (out: real);
12

  
13
function MPFRLe(i1, i2: real) returns (out: bool);
14

  
15
function MPFRLt(i1, i2: real) returns (out: bool);
16

  
17
function MPFRGe(i1, i2: real) returns (out: bool);
18

  
19
function MPFRGt(i1, i2: real) returns (out: bool);
20

  
21
function MPFREq(i1, i2: real) returns (out: bool);
22

  
23
function MPFRNeq(i1, i2: real) returns (out: bool);

Also available in: Unified diff