Lines Matching defs:RT
10 RT(x) should add a return type specific suffix to x. */
16 static int RT(ulpscale_mpfr) (mpfr_t x, int t)
21 mpfr_exp_t e = mpfr_get_exp (x) - RT(prec);
22 if (e < RT(emin))
23 e = RT(emin) - 1;
24 if (e > RT(emax) - RT(prec))
25 e = RT(emax) - RT(prec);
29 return RT(emin) - 1;
31 return RT(emax) - RT(prec);
40 static double RT (ulperr) (RT (float) got, const struct RT (ret) * p, int r,
43 RT(float) want = p->y;
44 RT(float) d;
47 if (RT(asuint) (got) == RT(asuint) (want))
54 return RT (issignaling) (got) == RT (issignaling) (want) ? 0 : INFINITY;
73 got = RT(copysign) (RT(halfinf), got);
78 want = RT(copysign) (RT(halfinf), want);
95 got = RT(nextafter) (got, want);
99 return RT(scalbn) (d, -p->ulpexp) + e;
102 static int RT(isok) (RT(float) ygot, int exgot, RT(float) ywant, int exwant,
105 return RT(asuint) (ygot) == RT(asuint) (ywant)
109 static int RT(isok_nofenv) (RT(float) ygot, RT(float) ywant)
111 return RT(asuint) (ygot) == RT(asuint) (ywant);
116 int r, RT (float) * y, int *ex,
129 int r, RT (float) * y, int *ex,
141 int r, struct RT (ret) * p,
142 RT (float) ygot, int exgot)
149 RT(double) yl = T(call_long) (f, a);
150 p->y = (RT(float)) yl;
151 volatile RT(float) vy = p->y; // TODO: barrier
157 if (RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may))
159 p->ulpexp = RT(ulpscale) (p->y);
161 p->tail = RT(lscalbn) (yl - (RT(double)) 2 * RT(halfinf), -p->ulpexp);
163 p->tail = RT(lscalbn) (yl - p->y, -p->ulpexp);
164 if (RT(fabs) (p->y) < RT(min_normal))
174 int r, struct RT(ret) * p,
175 RT(float) ygot, int exgot)
179 RT(double) yl = T(call_long) (f, a);
180 p->y = (RT(float)) yl;
183 if (RT(isok_nofenv) (ygot, p->y))
185 p->ulpexp = RT(ulpscale) (p->y);
187 p->tail = RT(lscalbn) (yl - (RT(double)) 2 * RT(halfinf), -p->ulpexp);
189 p->tail = RT(lscalbn) (yl - p->y, -p->ulpexp);
196 return T(reduce) (a, isnan, ||) && !T(reduce) (a, RT(issignaling), ||);
198 static inline RT(float) T(sum) (struct T(args) a)
205 int r_fenv, struct RT(ret) * p,
206 RT(float) ygot, int exgot)
211 MPFR_DECL_INIT(my, RT(prec_mpfr));
212 MPFR_DECL_INIT(mr, RT(prec));
213 MPFR_DECL_INIT(me, RT(prec_mpfr));
220 mpfr_set_emin (RT(emin));
221 mpfr_set_emax (RT(emax));
238 if (!mpfr_nanflag_p () && RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may))
242 p->ulpexp = RT(ulpscale_mpfr) (my, t);
252 return RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may);
256 return RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may);
281 struct RT(ret) want;
285 RT(float) ygot;
286 RT(float) ygot2;
299 if (RT(asuint) (ygot) != RT(asuint) (ygot2))
315 double err = RT (ulperr) (ygot, &want, r, conf->ignore_zero_sign);