OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libm/] [test/] [test.h] - Blame information for rev 864

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
#define HAVE_FLOAT 1
2
#define X(x) (char *)x
3
 
4
#include <_ansi.h>
5
#include <math.h>
6
#include <float.h>
7
#include <ieeefp.h>
8
#include <stdio.h>
9
 
10
void checkf();
11
void enter();
12
 
13
 
14
double translate_from();
15
 
16
typedef struct
17
{
18
  long msw, lsw;
19
} question_struct_type;
20
 
21
 
22
typedef struct
23
{
24
  char error_bit;
25
  char errno_val;
26
  char merror;
27
  int line;
28
 
29
  question_struct_type qs[3];
30
} one_line_type;
31
 
32
 
33
#define MVEC_START(x) one_line_type x[] =  {
34
#define MVEC_END    0,};
35
 
36
 
37
int _EXFUN(mag_of_error,(double, double));
38
 
39
 
40
#define ERROR_PERFECT 20
41
#define ERROR_FAIL -1
42
 
43
#define AAAA 15
44
#define AAA 10
45
#define AA  6
46
#define A   5
47
#define B   3
48
#define C   1 
49
#define VECOPEN(x,f) \
50
{\
51
  char buffer[100];\
52
   sprintf(buffer,"%s_vec.c",x);\
53
    f = fopen(buffer,"w");\
54
     fprintf(f,"#include \"test.h\"\n");\
55
      fprintf(f," one_line_type %s_vec[] = {\n", x);\
56
}
57
 
58
#define VECCLOSE(f,name,args)\
59
{\
60
  fprintf(f,"0,};\n");      \
61
   fprintf(f,"test_%s(m)   {run_vector_1(m,%s_vec,(char *)(%s),\"%s\",\"%s\");   }      \n",\
62
           name,\
63
           name,name,name,args);\
64
            fclose(f);\
65
}
66
 
67
 
68
 
69
typedef struct
70
{
71
  int line;
72
 
73
  char *string;
74
  double value;
75
  int endscan;
76
} double_type;
77
 
78
 
79
typedef struct {
80
  long int value;
81
  char end;
82
  char errno_val;
83
} int_scan_type;
84
 
85
typedef struct
86
{
87
  int line;
88
  int_scan_type octal;
89
  int_scan_type decimal;
90
  int_scan_type hex;
91
  int_scan_type normal;
92
  int_scan_type alphabetical;
93
  char *string;
94
} int_type;
95
 
96
 
97
typedef struct
98
{
99
  int line;
100
  double value;
101
  char *estring;
102
  int e1;
103
  int e2;
104
  int e3;
105
  char *fstring;
106
  int f1;
107
  int f2;
108
  int f3;
109
  char *gstring;
110
  int g1;
111
} ddouble_type;
112
 
113
typedef struct
114
{
115
  int line;
116
  double value;
117
  char *result;
118
  char *format_string;
119
} sprint_double_type;
120
 
121
 
122
typedef struct
123
{
124
  int line;
125
  int value;
126
  char *result;
127
  char *format_string;
128
} sprint_int_type;
129
 
130
 
131
void _EXFUN(test_ieee,(void));
132
void _EXFUN(test_math2,(void));
133
void _EXFUN(test_math,(void));
134
void _EXFUN(test_string,(void));
135
void _EXFUN(test_is,(void));
136
void _EXFUN(test_cvt,(void));
137
 
138
void _EXFUN(line,(int));
139
 
140
void _EXFUN(test_mok, (double, double, int));
141
void _EXFUN(test_iok, (int, int));
142
void _EXFUN(test_eok, (int, int));
143
void _EXFUN(test_sok, (char *, char*));
144
void _EXFUN(test_scok, (char *, char*, int));
145
void _EXFUN(newfunc,(_CONST char *));

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.