aboutsummaryrefslogtreecommitdiff
path: root/tests/nbody-java/native_java_lang_Math.c
blob: 4163f187be68a94b3e13ee492da373bd7aeae478 (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
#include "xmlvm.h"
#include "java_lang_Math.h"


//XMLVM_BEGIN_NATIVE_IMPLEMENTATION

#include <math.h>

//XMLVM_END_NATIVE_IMPLEMENTATION

JAVA_DOUBLE java_lang_Math_acos___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_acos___double]
    return acos(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_asin___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_asin___double]
    return asin(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_atan___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_atan___double]
    return atan(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_atan2___double_double(JAVA_DOUBLE n1, JAVA_DOUBLE n2)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_atan2___double_double]
    return atan2(n1, n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_cbrt___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_cbrt___double]
    return cbrt(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_ceil___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_ceil___double]
	return ceil(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_cos___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_cos___double]
    return cos(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_cosh___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_cosh___double]
    return cosh(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_exp___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_exp___double]
    return exp(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_expm1___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_expm1___double]
    return expm1(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_floor___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_floor___double]
    return floor(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_hypot___double_double(JAVA_DOUBLE n1, JAVA_DOUBLE n2)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_hypot___double_double]
    return hypot(n1, n2);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_IEEEremainder___double_double(JAVA_DOUBLE n1, JAVA_DOUBLE n2)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_IEEEremainder___double_double]
    return remainder(n1, n2);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_log___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_log___double]
    return log(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_log10___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_log10___double]
    return log10(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_log1p___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_log1p___double]
    return log1p(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_pow___double_double(JAVA_DOUBLE n1, JAVA_DOUBLE n2)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_pow___double_double]
    return pow(n1, n2);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_rint___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_rint___double]
    return rint(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_sin___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_sin___double]
    return sin(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_sinh___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_sinh___double]
    return sinh(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_sqrt___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_sqrt___double]
    return sqrt(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_tan___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_tan___double]
    return tan(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_tanh___double(JAVA_DOUBLE n1)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_tanh___double]
    return tanh(n1);
    //XMLVM_END_NATIVE
}

JAVA_DOUBLE java_lang_Math_nextafter___double_double(JAVA_DOUBLE n1, JAVA_DOUBLE n2)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_nextafter___double_double]
    return nextafter(n1, n2);
    //XMLVM_END_NATIVE
}

JAVA_FLOAT java_lang_Math_nextafterf___float_float(JAVA_FLOAT n1, JAVA_FLOAT n2)
{
    //XMLVM_BEGIN_NATIVE[java_lang_Math_nextafterf___float_float]
    return nextafterf(n1, n2);
    //XMLVM_END_NATIVE
}