]>
Commit | Line | Data |
---|---|---|
1eee94d3 GM |
1 | /* Glibm.c provides access to some libm functions. |
2 | ||
83ffe9cd | 3 | Copyright (C) 2016-2023 Free Software Foundation, Inc. |
1eee94d3 GM |
4 | Contributed by Gaius Mulley <gaius@glam.ac.uk>. |
5 | ||
6 | This file is part of GNU Modula-2. | |
7 | ||
8 | GNU Modula-2 is free software; you can redistribute it and/or modify | |
9 | it under the terms of the GNU General Public License as published by | |
10 | the Free Software Foundation; either version 3, or (at your option) | |
11 | any later version. | |
12 | ||
13 | GNU Modula-2 is distributed in the hope that it will be useful, but | |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU General Public License | |
19 | along with GNU Modula-2; see the file COPYING3. If not see | |
20 | <http://www.gnu.org/licenses/>. */ | |
21 | ||
22 | #define _libm_C | |
23 | #include "config.h" | |
24 | #include "system.h" | |
25 | ||
26 | #include "Glibm.h" | |
27 | ||
28 | double | |
29 | libm_pow (double x, double y) | |
30 | { | |
31 | return pow (x, y); | |
32 | } | |
33 | ||
34 | float | |
35 | libm_powf (float x, float y) | |
36 | { | |
37 | return powf (x, y); | |
38 | } | |
39 | ||
40 | long double | |
41 | libm_powl (long double x, long double y) | |
42 | { | |
43 | return powl (x, y); | |
44 | } | |
45 | ||
46 | double | |
47 | libm_sqrt (double x) | |
48 | { | |
49 | return sqrt (x); | |
50 | } | |
51 | ||
52 | float | |
53 | libm_sqrtf (float x) | |
54 | { | |
55 | return sqrtf (x); | |
56 | } | |
57 | ||
58 | long double | |
59 | libm_sqrtl (long double x) | |
60 | { | |
61 | return sqrtl (x); | |
62 | } | |
63 | ||
64 | double | |
65 | libm_asin (double x) | |
66 | { | |
67 | return asin (x); | |
68 | } | |
69 | ||
70 | float | |
71 | libm_asinf (float x) | |
72 | { | |
73 | return asinf (x); | |
74 | } | |
75 | ||
76 | long double | |
77 | libm_asinl (long double x) | |
78 | { | |
79 | return asinl (x); | |
80 | } | |
81 | ||
82 | double | |
83 | libm_atan (double x) | |
84 | { | |
85 | return atan (x); | |
86 | } | |
87 | ||
88 | float | |
89 | libm_atanf (float x) | |
90 | { | |
91 | return atanf (x); | |
92 | } | |
93 | ||
94 | long double | |
95 | libm_atanl (long double x) | |
96 | { | |
97 | return atanl (x); | |
98 | } | |
99 | ||
100 | double | |
101 | libm_atan2 (double x, double y) | |
102 | { | |
103 | return atan2 (x, y); | |
104 | } | |
105 | ||
106 | float | |
107 | libm_atan2f (float x, float y) | |
108 | { | |
109 | return atan2f (x, y); | |
110 | } | |
111 | ||
112 | long double | |
113 | libm_atan2l (long double x, long double y) | |
114 | { | |
115 | return atan2l (x, y); | |
116 | } | |
117 | ||
118 | double | |
119 | libm_sin (double x) | |
120 | { | |
121 | return sin (x); | |
122 | } | |
123 | ||
124 | float | |
125 | libm_sinf (float x) | |
126 | { | |
127 | return sinf (x); | |
128 | } | |
129 | ||
130 | long double | |
131 | libm_sinl (long double x) | |
132 | { | |
133 | return sinl (x); | |
134 | } | |
135 | ||
136 | double | |
137 | libm_cos (double x) | |
138 | { | |
139 | return cos (x); | |
140 | } | |
141 | ||
142 | float | |
143 | libm_cosf (float x) | |
144 | { | |
145 | return cosf (x); | |
146 | } | |
147 | ||
148 | long double | |
149 | libm_cosl (long double x) | |
150 | { | |
151 | return cosl (x); | |
152 | } | |
153 | ||
154 | double | |
155 | libm_tan (double x) | |
156 | { | |
157 | return tan (x); | |
158 | } | |
159 | ||
160 | float | |
161 | libm_tanf (float x) | |
162 | { | |
163 | return tanf (x); | |
164 | } | |
165 | ||
166 | long double | |
167 | libm_tanl (long double x) | |
168 | { | |
169 | return tanl (x); | |
170 | } | |
171 | ||
172 | float | |
173 | libm_floorf (float x) | |
174 | { | |
175 | return floorf (x); | |
176 | } | |
177 | ||
178 | double | |
179 | libm_floor (double x) | |
180 | { | |
181 | return floor (x); | |
182 | } | |
183 | ||
184 | long double | |
185 | libm_floorl (long double x) | |
186 | { | |
187 | return floorl (x); | |
188 | } | |
189 | ||
190 | float | |
191 | libm_expf (float x) | |
192 | { | |
193 | return expf (x); | |
194 | } | |
195 | ||
196 | double | |
197 | libm_exp (double x) | |
198 | { | |
199 | return exp (x); | |
200 | } | |
201 | ||
202 | long double | |
203 | libm_expl (long double x) | |
204 | { | |
205 | return expl (x); | |
206 | } | |
207 | ||
208 | float | |
209 | libm_logf (float x) | |
210 | { | |
211 | return logf (x); | |
212 | } | |
213 | ||
214 | double | |
215 | libm_log (double x) | |
216 | { | |
217 | return log (x); | |
218 | } | |
219 | ||
220 | long double | |
221 | libm_logl (long double x) | |
222 | { | |
223 | return logl (x); | |
224 | } |