Lines Matching refs:p

40 static double RT (ulperr) (RT (float) got, const struct RT (ret) * p, int r,  in RT()
43 RT(float) want = p->y; in RT()
85 e = d > 0 ? -p->tail - 0.5 : -p->tail + 0.5; in RT()
93 e = -p->tail; in RT()
95 return RT(scalbn) (d, -p->ulpexp) + e; in RT()
135 int r, struct RT(ret) * p, in T()
144 p->y = (RT(float)) yl; in T()
145 volatile RT(float) vy = p->y; // TODO: barrier in T()
147 p->ex = fetestexcept (FE_ALL_EXCEPT); in T()
150 p->ex_may = FE_INEXACT; in T()
151 if (RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may)) in T()
153 p->ulpexp = RT(ulpscale) (p->y); in T()
154 if (isinf (p->y)) in T()
155 p->tail = RT(lscalbn) (yl - (RT(double)) 2 * RT(halfinf), -p->ulpexp); in T()
157 p->tail = RT(lscalbn) (yl - p->y, -p->ulpexp); in T()
158 if (RT(fabs) (p->y) < RT(min_normal)) in T()
162 if (p->y != 0 || (p->ex & FE_INEXACT)) in T()
163 p->ex |= FE_UNDERFLOW | FE_INEXACT; in T()
168 int r, struct RT(ret) * p, in T()
174 p->y = (RT(float)) yl; in T()
177 if (RT(isok_nofenv) (ygot, p->y)) in T()
179 p->ulpexp = RT(ulpscale) (p->y); in T()
180 if (isinf (p->y)) in T()
181 p->tail = RT(lscalbn) (yl - (RT(double)) 2 * RT(halfinf), -p->ulpexp); in T()
183 p->tail = RT(lscalbn) (yl - p->y, -p->ulpexp); in T()
199 int r_fenv, struct RT(ret) * p, in T()
220 p->y = mpfr_get_d (mr, r); in T()
221 p->ex = t ? FE_INEXACT : 0; in T()
222 p->ex_may = FE_INEXACT; in T()
223 if (mpfr_underflow_p () && (p->ex & FE_INEXACT)) in T()
225 p->ex |= FE_UNDERFLOW; in T()
227 p->ex |= FE_OVERFLOW | FE_INEXACT; in T()
229 p->ex |= FE_DIVBYZERO; in T()
232 if (!mpfr_nanflag_p () && RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may)) in T()
235 p->ex |= FE_INVALID; in T()
236 p->ulpexp = RT(ulpscale_mpfr) (my, t); in T()
237 if (!isfinite (p->y)) in T()
239 p->tail = 0; in T()
240 if (isnan (p->y)) in T()
243 p->y = T(sum) (a); in T()
244 if (!isnan (p->y)) in T()
245 p->y = (p->y - p->y) / (p->y - p->y); in T()
246 return RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may); in T()
248 mpfr_set_si_2exp (mr, signbit (p->y) ? -1 : 1, 1024, MPFR_RNDN); in T()
250 return RT(isok) (ygot, exgot, p->y, p->ex, p->ex_may); in T()
253 mpfr_mul_2si (me, me, -p->ulpexp, MPFR_RNDN); in T()
254 p->tail = mpfr_get_d (me, MPFR_RNDN); in T()