1 | /*
|
---|
2 | * Copyright (c) 2014 Martin Decky
|
---|
3 | * Copyright (c) 2015 Jiri Svoboda
|
---|
4 | * All rights reserved.
|
---|
5 | *
|
---|
6 | * Redistribution and use in source and binary forms, with or without
|
---|
7 | * modification, are permitted provided that the following conditions
|
---|
8 | * are met:
|
---|
9 | *
|
---|
10 | * - Redistributions of source code must retain the above copyright
|
---|
11 | * notice, this list of conditions and the following disclaimer.
|
---|
12 | * - Redistributions in binary form must reproduce the above copyright
|
---|
13 | * notice, this list of conditions and the following disclaimer in the
|
---|
14 | * documentation and/or other materials provided with the distribution.
|
---|
15 | * - The name of the author may not be used to endorse or promote products
|
---|
16 | * derived from this software without specific prior written permission.
|
---|
17 | *
|
---|
18 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
19 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
20 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
21 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
22 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
23 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
24 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
25 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
27 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
28 | */
|
---|
29 |
|
---|
30 | /** @addtogroup libmathia64
|
---|
31 | * @{
|
---|
32 | */
|
---|
33 | /** @file
|
---|
34 | */
|
---|
35 |
|
---|
36 | #ifndef LIBMATH_ia64_MATH_H_
|
---|
37 | #define LIBMATH_ia64_MATH_H_
|
---|
38 |
|
---|
39 | #include <ceil.h>
|
---|
40 | #include <exp.h>
|
---|
41 | #include <floor.h>
|
---|
42 | #include <log.h>
|
---|
43 | #include <mathtypes.h>
|
---|
44 | #include <mod.h>
|
---|
45 | #include <pow.h>
|
---|
46 | #include <trunc.h>
|
---|
47 | #include <trig.h>
|
---|
48 |
|
---|
49 | static inline float64_t ceil_f64(float64_t val)
|
---|
50 | {
|
---|
51 | return float64_ceil(val);
|
---|
52 | }
|
---|
53 |
|
---|
54 | static inline float32_t ceil_f32(float32_t val)
|
---|
55 | {
|
---|
56 | return float32_ceil(val);
|
---|
57 | }
|
---|
58 |
|
---|
59 | static inline float64_t cos_f64(float64_t val)
|
---|
60 | {
|
---|
61 | return float64_cos(val);
|
---|
62 | }
|
---|
63 |
|
---|
64 | static inline float32_t cos_f32(float32_t val)
|
---|
65 | {
|
---|
66 | return float32_cos(val);
|
---|
67 | }
|
---|
68 |
|
---|
69 | static inline float64_t exp_f64(float64_t val)
|
---|
70 | {
|
---|
71 | return float64_exp(val);
|
---|
72 | }
|
---|
73 |
|
---|
74 | static inline float32_t exp_f32(float32_t val)
|
---|
75 | {
|
---|
76 | return float32_exp(val);
|
---|
77 | }
|
---|
78 |
|
---|
79 | static inline float64_t floor_f64(float64_t val)
|
---|
80 | {
|
---|
81 | return float64_floor(val);
|
---|
82 | }
|
---|
83 |
|
---|
84 | static inline float32_t floor_f32(float32_t val)
|
---|
85 | {
|
---|
86 | return float32_floor(val);
|
---|
87 | }
|
---|
88 |
|
---|
89 | static inline float64_t fmod_f64(float64_t dividend, float64_t divisor)
|
---|
90 | {
|
---|
91 | return float64_mod(dividend, divisor);
|
---|
92 | }
|
---|
93 |
|
---|
94 | static inline float64_t fmod_f32(float32_t dividend, float32_t divisor)
|
---|
95 | {
|
---|
96 | return float32_mod(dividend, divisor);
|
---|
97 | }
|
---|
98 |
|
---|
99 | static inline float64_t log_f64(float64_t val)
|
---|
100 | {
|
---|
101 | return float64_log(val);
|
---|
102 | }
|
---|
103 |
|
---|
104 | static inline float32_t log_f32(float32_t val)
|
---|
105 | {
|
---|
106 | return float32_log(val);
|
---|
107 | }
|
---|
108 |
|
---|
109 | static inline float64_t pow_f64(float64_t x, float64_t y)
|
---|
110 | {
|
---|
111 | return float64_pow(x, y);
|
---|
112 | }
|
---|
113 |
|
---|
114 | static inline float32_t pow_f32(float32_t x, float32_t y)
|
---|
115 | {
|
---|
116 | return float32_pow(x, y);
|
---|
117 | }
|
---|
118 |
|
---|
119 | static inline float64_t sin_f64(float64_t val)
|
---|
120 | {
|
---|
121 | return float64_sin(val);
|
---|
122 | }
|
---|
123 |
|
---|
124 | static inline float32_t sin_f32(float32_t val)
|
---|
125 | {
|
---|
126 | return float32_sin(val);
|
---|
127 | }
|
---|
128 |
|
---|
129 | static inline float64_t trunc_f64(float64_t val)
|
---|
130 | {
|
---|
131 | return float64_trunc(val);
|
---|
132 | }
|
---|
133 |
|
---|
134 | static inline float32_t trunc_f32(float32_t val)
|
---|
135 | {
|
---|
136 | return float32_trunc(val);
|
---|
137 | }
|
---|
138 |
|
---|
139 | static inline float64_t ceil(float64_t val)
|
---|
140 | {
|
---|
141 | return ceil_f64(val);
|
---|
142 | }
|
---|
143 |
|
---|
144 | static inline float32_t ceilf(float32_t val)
|
---|
145 | {
|
---|
146 | return ceil_f32(val);
|
---|
147 | }
|
---|
148 |
|
---|
149 | static inline float64_t cos(float64_t val)
|
---|
150 | {
|
---|
151 | return cos_f64(val);
|
---|
152 | }
|
---|
153 |
|
---|
154 | static inline float32_t cosf(float32_t val)
|
---|
155 | {
|
---|
156 | return cos_f32(val);
|
---|
157 | }
|
---|
158 |
|
---|
159 | static inline float64_t exp(float64_t val)
|
---|
160 | {
|
---|
161 | return exp_f64(val);
|
---|
162 | }
|
---|
163 |
|
---|
164 | static inline float32_t expf(float32_t val)
|
---|
165 | {
|
---|
166 | return exp_f32(val);
|
---|
167 | }
|
---|
168 |
|
---|
169 | static inline float64_t floor(float64_t val)
|
---|
170 | {
|
---|
171 | return floor_f64(val);
|
---|
172 | }
|
---|
173 |
|
---|
174 | static inline float32_t floorf(float32_t val)
|
---|
175 | {
|
---|
176 | return floor_f32(val);
|
---|
177 | }
|
---|
178 |
|
---|
179 | static inline float64_t fmod(float64_t dividend, float64_t divisor)
|
---|
180 | {
|
---|
181 | return fmod_f64(dividend, divisor);
|
---|
182 | }
|
---|
183 |
|
---|
184 | static inline float32_t fmodf(float32_t dividend, float32_t divisor)
|
---|
185 | {
|
---|
186 | return fmod_f32(dividend, divisor);
|
---|
187 | }
|
---|
188 |
|
---|
189 | static inline float64_t log(float64_t val)
|
---|
190 | {
|
---|
191 | return log_f64(val);
|
---|
192 | }
|
---|
193 |
|
---|
194 | static inline float32_t logf(float32_t val)
|
---|
195 | {
|
---|
196 | return log_f32(val);
|
---|
197 | }
|
---|
198 |
|
---|
199 | static inline float64_t pow(float64_t x, float64_t y)
|
---|
200 | {
|
---|
201 | return pow_f64(x, y);
|
---|
202 | }
|
---|
203 |
|
---|
204 | static inline float32_t powf(float32_t x, float32_t y)
|
---|
205 | {
|
---|
206 | return pow_f32(x, y);
|
---|
207 | }
|
---|
208 |
|
---|
209 | static inline float64_t sin(float64_t val)
|
---|
210 | {
|
---|
211 | return sin_f64(val);
|
---|
212 | }
|
---|
213 |
|
---|
214 | static inline float32_t sinf(float32_t val)
|
---|
215 | {
|
---|
216 | return sin_f32(val);
|
---|
217 | }
|
---|
218 |
|
---|
219 | static inline float64_t trunc(float64_t val)
|
---|
220 | {
|
---|
221 | return trunc_f64(val);
|
---|
222 | }
|
---|
223 |
|
---|
224 | static inline float32_t truncf(float32_t val)
|
---|
225 | {
|
---|
226 | return trunc_f32(val);
|
---|
227 | }
|
---|
228 |
|
---|
229 | #endif
|
---|
230 |
|
---|
231 | /** @}
|
---|
232 | */
|
---|