3 static int mpf1(struct t *s, float (*f)(float))
12 static int mpf2(struct t *s, float (*f)(float,float))
16 s->y = f(s->x, s->x2);
21 static int mpd1(struct t *s, double (*f)(double))
30 static int mpd2(struct t *s, double (*f)(double, double))
34 s->y = f(s->x, s->x2);
39 static int mpl1(struct t *s, long double (*f)(long double))
48 static int mpl2(struct t *s, long double (*f)(long double, long double))
51 s->y = f(s->x, s->x2);
58 int mpacos(struct t *t) { return mpd1(t, acos); }
59 int mpacosf(struct t *t) { return mpf1(t, acosf); }
60 int mpacosl(struct t *t) { return mpl1(t, acosl); }
61 int mpacosh(struct t *t) { return mpd1(t, acosh); }
62 int mpacoshf(struct t *t) { return mpf1(t, acoshf); }
63 int mpacoshl(struct t *t) { return mpl1(t, acoshl); }
64 int mpasin(struct t *t) { return mpd1(t, asin); }
65 int mpasinf(struct t *t) { return mpf1(t, asinf); }
66 int mpasinl(struct t *t) { return mpl1(t, asinl); }
67 int mpasinh(struct t *t) { return mpd1(t, asinh); }
68 int mpasinhf(struct t *t) { return mpf1(t, asinhf); }
69 int mpasinhl(struct t *t) { return mpl1(t, asinhl); }
70 int mpatan(struct t *t) { return mpd1(t, atan); }
71 int mpatanf(struct t *t) { return mpf1(t, atanf); }
72 int mpatanl(struct t *t) { return mpl1(t, atanl); }
73 int mpatan2(struct t *t) { return mpd2(t, atan2); }
74 int mpatan2f(struct t *t) { return mpf2(t, atan2f); }
75 int mpatan2l(struct t *t) { return mpl2(t, atan2l); }
76 int mpatanh(struct t *t) { return mpd1(t, atanh); }
77 int mpatanhf(struct t *t) { return mpf1(t, atanhf); }
78 int mpatanhl(struct t *t) { return mpl1(t, atanhl); }
79 int mpcbrt(struct t *t) { return mpd1(t, cbrt); }
80 int mpcbrtf(struct t *t) { return mpf1(t, cbrtf); }
81 int mpcbrtl(struct t *t) { return mpl1(t, cbrtl); }
82 int mpceil(struct t *t) { return mpd1(t, ceil); }
83 int mpceilf(struct t *t) { return mpf1(t, ceilf); }
84 int mpceill(struct t *t) { return mpl1(t, ceill); }
85 int mpcopysign(struct t *t) { return mpd2(t, copysign); }
86 int mpcopysignf(struct t *t) { return mpf2(t, copysignf); }
87 int mpcopysignl(struct t *t) { return mpl2(t, copysignl); }
88 int mpcos(struct t *t) { return mpd1(t, cos); }
89 int mpcosf(struct t *t) { return mpf1(t, cosf); }
90 int mpcosl(struct t *t) { return mpl1(t, cosl); }
91 int mpcosh(struct t *t) { return mpd1(t, cosh); }
92 int mpcoshf(struct t *t) { return mpf1(t, coshf); }
93 int mpcoshl(struct t *t) { return mpl1(t, coshl); }
94 int mperf(struct t *t) { return mpd1(t, erf); }
95 int mperff(struct t *t) { return mpf1(t, erff); }
96 int mperfl(struct t *t) { return mpl1(t, erfl); }
97 int mperfc(struct t *t) { return mpd1(t, erfc); }
98 int mperfcf(struct t *t) { return mpf1(t, erfcf); }
99 int mperfcl(struct t *t) { return mpl1(t, erfcl); }
100 int mpexp(struct t *t) { return mpd1(t, exp); }
101 int mpexpf(struct t *t) { return mpf1(t, expf); }
102 int mpexpl(struct t *t) { return mpl1(t, expl); }
103 int mpexp2(struct t *t) { return mpd1(t, exp2); }
104 int mpexp2f(struct t *t) { return mpf1(t, exp2f); }
105 int mpexp2l(struct t *t) { return mpl1(t, exp2l); }
106 int mpexpm1(struct t *t) { return mpd1(t, expm1); }
107 int mpexpm1f(struct t *t) { return mpf1(t, expm1f); }
108 int mpexpm1l(struct t *t) { return mpl1(t, expm1l); }
109 int mpfabs(struct t *t) { return mpd1(t, fabs); }
110 int mpfabsf(struct t *t) { return mpf1(t, fabsf); }
111 int mpfabsl(struct t *t) { return mpl1(t, fabsl); }
112 int mpfdim(struct t *t) { return mpd2(t, fdim); }
113 int mpfdimf(struct t *t) { return mpf2(t, fdimf); }
114 int mpfdiml(struct t *t) { return mpl2(t, fdiml); }
115 int mpfloor(struct t *t) { return mpd1(t, floor); }
116 int mpfloorf(struct t *t) { return mpf1(t, floorf); }
117 int mpfloorl(struct t *t) { return mpl1(t, floorl); }
118 int mpfmax(struct t *t) { return mpd2(t, fmax); }
119 int mpfmaxf(struct t *t) { return mpf2(t, fmaxf); }
120 int mpfmaxl(struct t *t) { return mpl2(t, fmaxl); }
121 int mpfmin(struct t *t) { return mpd2(t, fmin); }
122 int mpfminf(struct t *t) { return mpf2(t, fminf); }
123 int mpfminl(struct t *t) { return mpl2(t, fminl); }
124 int mpfmod(struct t *t) { return mpd2(t, fmod); }
125 int mpfmodf(struct t *t) { return mpf2(t, fmodf); }
126 int mpfmodl(struct t *t) { return mpl2(t, fmodl); }
127 int mphypot(struct t *t) { return mpd2(t, hypot); }
128 int mphypotf(struct t *t) { return mpf2(t, hypotf); }
129 int mphypotl(struct t *t) { return mpl2(t, hypotl); }
130 int mplog(struct t *t) { return mpd1(t, log); }
131 int mplogf(struct t *t) { return mpf1(t, logf); }
132 int mplogl(struct t *t) { return mpl1(t, logl); }
133 int mplog10(struct t *t) { return mpd1(t, log10); }
134 int mplog10f(struct t *t) { return mpf1(t, log10f); }
135 int mplog10l(struct t *t) { return mpl1(t, log10l); }
136 int mplog1p(struct t *t) { return mpd1(t, log1p); }
137 int mplog1pf(struct t *t) { return mpf1(t, log1pf); }
138 int mplog1pl(struct t *t) { return mpl1(t, log1pl); }
139 int mplog2(struct t *t) { return mpd1(t, log2); }
140 int mplog2f(struct t *t) { return mpf1(t, log2f); }
141 int mplog2l(struct t *t) { return mpl1(t, log2l); }
142 int mplogb(struct t *t) { return mpd1(t, logb); }
143 int mplogbf(struct t *t) { return mpf1(t, logbf); }
144 int mplogbl(struct t *t) { return mpl1(t, logbl); }
145 int mpnearbyint(struct t *t) { return mpd1(t, nearbyint); }
146 int mpnearbyintf(struct t *t) { return mpf1(t, nearbyintf); }
147 int mpnearbyintl(struct t *t) { return mpl1(t, nearbyintl); }
148 int mpnextafter(struct t *t) { return mpd2(t, nextafter); }
149 int mpnextafterf(struct t *t) { return mpf2(t, nextafterf); }
150 int mpnextafterl(struct t *t) { return mpl2(t, nextafterl); }
151 int mpnexttoward(struct t *t)
153 feclearexcept(FE_ALL_EXCEPT);
154 t->y = nexttoward(t->x, t->x2);
159 int mpnexttowardf(struct t *t)
161 feclearexcept(FE_ALL_EXCEPT);
162 t->y = nexttowardf(t->x, t->x2);
167 int mpnexttowardl(struct t *t) { return mpl2(t, nexttowardl); }
168 int mppow(struct t *t) { return mpd2(t, pow); }
169 int mppowf(struct t *t) { return mpf2(t, powf); }
170 int mppowl(struct t *t) { return mpl2(t, powl); }
171 int mpremainder(struct t *t) { return mpd2(t, remainder); }
172 int mpremainderf(struct t *t) { return mpf2(t, remainderf); }
173 int mpremainderl(struct t *t) { return mpl2(t, remainderl); }
174 int mprint(struct t *t) { return mpd1(t, rint); }
175 int mprintf(struct t *t) { return mpf1(t, rintf); }
176 int mprintl(struct t *t) { return mpl1(t, rintl); }
177 int mpround(struct t *t) { return mpd1(t, round); }
178 int mproundf(struct t *t) { return mpf1(t, roundf); }
179 int mproundl(struct t *t) { return mpl1(t, roundl); }
180 int mpsin(struct t *t) { return mpd1(t, sin); }
181 int mpsinf(struct t *t) { return mpf1(t, sinf); }
182 int mpsinl(struct t *t) { return mpl1(t, sinl); }
183 int mpsinh(struct t *t) { return mpd1(t, sinh); }
184 int mpsinhf(struct t *t) { return mpf1(t, sinhf); }
185 int mpsinhl(struct t *t) { return mpl1(t, sinhl); }
186 int mpsqrt(struct t *t) { return mpd1(t, sqrt); }
187 int mpsqrtf(struct t *t) { return mpf1(t, sqrtf); }
188 int mpsqrtl(struct t *t) { return mpl1(t, sqrtl); }
189 int mptan(struct t *t) { return mpd1(t, tan); }
190 int mptanf(struct t *t) { return mpf1(t, tanf); }
191 int mptanl(struct t *t) { return mpl1(t, tanl); }
192 int mptanh(struct t *t) { return mpd1(t, tanh); }
193 int mptanhf(struct t *t) { return mpf1(t, tanhf); }
194 int mptanhl(struct t *t) { return mpl1(t, tanhl); }
195 int mptgamma(struct t *t) { return mpd1(t, tgamma); }
196 int mptgammaf(struct t *t) { return mpf1(t, tgammaf); }
197 int mptgammal(struct t *t) { return mpl1(t, tgammal); }
198 int mptrunc(struct t *t) { return mpd1(t, trunc); }
199 int mptruncf(struct t *t) { return mpf1(t, truncf); }
200 int mptruncl(struct t *t) { return mpl1(t, truncl); }
201 int mpj0(struct t *t) { return mpd1(t, j0); }
202 int mpj1(struct t *t) { return mpd1(t, j1); }
203 int mpy0(struct t *t) { return mpd1(t, y0); }
204 int mpy1(struct t *t) { return mpd1(t, y1); }
205 int mpscalb(struct t *t) { return mpd2(t, scalb); }
206 int mpscalbf(struct t *t) { return mpf2(t, scalbf); }
207 int mpj0f(struct t *t) { return mpf1(t, j0f); }
208 int mpj0l(struct t *t) { return -1;}//mpl1(t, j0l); }
209 int mpj1f(struct t *t) { return mpf1(t, j1f); }
210 int mpj1l(struct t *t) { return -1;}//mpl1(t, j1l); }
211 int mpy0f(struct t *t) { return mpf1(t, y0f); }
212 int mpy0l(struct t *t) { return -1;}//mpl1(t, y0l); }
213 int mpy1f(struct t *t) { return mpf1(t, y1f); }
214 int mpy1l(struct t *t) { return -1;}//mpl1(t, y1l); }
215 int mpexp10(struct t *t) { return mpd1(t, exp10); }
216 int mpexp10f(struct t *t) { return mpf1(t, exp10f); }
217 int mpexp10l(struct t *t) { return mpl1(t, exp10l); }
218 int mppow10(struct t *t) { return mpd1(t, pow10); }
219 int mppow10f(struct t *t) { return mpf1(t, pow10f); }
220 int mppow10l(struct t *t) { return mpl1(t, pow10l); }
223 int mp##n(struct t *t) \
227 t->y = n(t->x, t->i); \
228 t->e = getexcept(); \
243 int mp##n(struct t *t) \
248 t->y = n(t->x, &i); \
249 t->e = getexcept(); \
261 int mplgamma(struct t *t)
271 int mplgammaf(struct t *t)
275 t->y = lgammaf(t->x);
281 int mplgammal(struct t *t)
285 t->y = lgammal(t->x);
292 int mp##n(struct t *t) \
296 t->e = getexcept(); \
316 int mpmodf(struct t *t)
322 t->y = modf(t->x, &y2);
328 int mpmodff(struct t *t)
334 t->y = modff(t->x, &y2);
340 int mpmodfl(struct t *t)
344 t->y = modfl(t->x, &t->y2);
349 int mpsincos(struct t *t)
355 sincos(t->x, &y, &y2);
362 int mpsincosf(struct t *t)
368 sincosf(t->x, &y, &y2);
375 int mpsincosl(struct t *t)
379 sincosl(t->x, &t->y, &t->y2);
384 #define mp_ff_fi(n) \
385 int mp##n(struct t *t) \
390 t->y = n(t->x, t->x2, &i); \
391 t->e = getexcept(); \
400 #define mp_fff_f(n) \
401 int mp##n(struct t *t) \
405 t->y = n(t->x, t->x2, t->x3); \
406 t->e = getexcept(); \
415 int mp##n(struct t *t) \
419 t->y = n(t->i, t->x); \
420 t->e = getexcept(); \