forked from ArduPilot/ardupilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AP_Math_AVR_Compat.h
153 lines (114 loc) · 1.83 KB
/
AP_Math_AVR_Compat.h
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
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#ifndef AP_MATH_AVR_COMPAT_H
#define AP_MATH_AVR_COMPAT_H
// This file defines the floating-point version of standard C math
// functions on doubles, if they are not present in avr-libc.
#ifndef cosf
# define cosf cos
#endif
#ifndef sinf
# define sinf sin
#endif
#ifndef tanf
# define tanf tan
#endif
#ifndef fabsf
# define fabsf fabs
#endif
#ifndef fmodf
# define fmodf fmod
#endif
#ifndef sqrtf
# define sqrtf sqrt
#endif
#ifndef cbrtf
# define cbrtf cbrt
#endif
#ifndef hypotf
# define hypotf hypot
#endif
#ifndef squaref
# define squaref square
#endif
#ifndef floorf
# define floorf floor
#endif
#ifndef ceilf
# define ceilf ceil
#endif
#ifndef frexpf
# define frexpf frexp
#endif
#ifndef ldexpf
# define ldexpf ldexp
#endif
#ifndef expf
# define expf exp
#endif
#ifndef coshf
# define coshf cosh
#endif
#ifndef sinhf
# define sinhf sinh
#endif
#ifndef tanhf
# define tanhf tanh
#endif
#ifndef acosf
# define acosf acos
#endif
#ifndef asinf
# define asinf asin
#endif
#ifndef atanf
# define atanf atan
#endif
#ifndef atan2f
# define atan2f atan2
#endif
#ifndef logf
# define logf log
#endif
#ifndef log10f
# define log10f log10
#endif
#ifndef powf
# define powf pow
#endif
#ifndef isnanf
# define isnanf isnan
#endif
#ifndef isinff
# define isinff isinf
#endif
#ifndef isfinitef
# define isfinitef isfinite
#endif
#ifndef copysignf
# define copysignf copysign
#endif
#ifndef signbitf
# define signbitf signbit
#endif
#ifndef fdimf
# define fdimf fdim
#endif
#ifndef fmaf
# define fmaf fma
#endif
#ifndef fminf
# define fminf fmin
#endif
#ifndef truncf
# define truncf trunc
#endif
#ifndef roundf
# define roundf round
#endif
#ifndef lroundf
# define lroundf lround
#endif
#ifndef lrintf
# define lrintf lrint
#endif
#endif // !defined AP_MATH_AVR_COMPAT_H