Home
last modified time | relevance | path

Searched refs:MPFR_PREC (Results 1 – 25 of 144) sorted by relevance

123456

/netbsd-src/external/lgpl3/mpfr/dist/src/
H A Dsub.c105 if (MPFR_LIKELY (MPFR_PREC (a) == MPFR_PREC (b) in mpfr_sub()
106 && MPFR_PREC (b) == MPFR_PREC (c))) in mpfr_sub()
117 if (MPFR_LIKELY (MPFR_PREC (a) == MPFR_PREC (b) in mpfr_sub()
118 && MPFR_PREC (b) == MPFR_PREC (c))) in mpfr_sub()
127 if (MPFR_LIKELY (MPFR_PREC (a) == MPFR_PREC (b) in mpfr_sub()
128 && MPFR_PREC (b) == MPFR_PREC (c))) in mpfr_sub()
H A Dadd.c105 if (MPFR_LIKELY(MPFR_PREC(a) == MPFR_PREC(b) in mpfr_add()
106 && MPFR_PREC(b) == MPFR_PREC(c))) in mpfr_add()
113 if (MPFR_LIKELY(MPFR_PREC(a) == MPFR_PREC(b) in mpfr_add()
114 && MPFR_PREC(b) == MPFR_PREC(c))) in mpfr_add()
H A Ddigamma.c38 mpfr_prec_t p = MPFR_PREC (s); in mpfr_digamma_approx()
118 mpfr_prec_t p = MPFR_PREC(y) + 10; in mpfr_digamma_reflection()
134 q = MPFR_PREC(x) + 1 - expx; in mpfr_digamma_reflection()
135 else if (expx <= MPFR_PREC(x)) in mpfr_digamma_reflection()
136 q = MPFR_PREC(x) + 1; in mpfr_digamma_reflection()
186 if (MPFR_CAN_ROUND (v, p - e1, MPFR_PREC(y), rnd_mode)) in mpfr_digamma_reflection()
209 mpfr_prec_t p = MPFR_PREC(y) + 10, q; in mpfr_digamma_positive()
230 if (MPFR_PREC(y) + GUARD < MPFR_EXP(x)) in mpfr_digamma_positive()
233 mpfr_init2 (t, MPFR_PREC(y) + GUARD); in mpfr_digamma_positive()
240 if (MPFR_CAN_ROUND (t, MPFR_PREC(y) + GUARD, MPFR_PREC(y), rnd_mode)) in mpfr_digamma_positive()
[all …]
H A Dcache.c31 MPFR_PREC (cache->x) = 0; /* Invalid prec to detect that the cache is not
40 if (MPFR_UNLIKELY (MPFR_PREC (cache->x) != 0)) in mpfr_clear_cache()
45 if (MPFR_LIKELY (MPFR_PREC (cache->x) != 0)) in mpfr_clear_cache()
48 MPFR_PREC (cache->x) = 0; in mpfr_clear_cache()
59 mpfr_prec_t dprec = MPFR_PREC (dest); in mpfr_cache()
72 cprec = MPFR_PREC (cache->x); in mpfr_cache()
81 cprec = MPFR_PREC (cache->x); in mpfr_cache()
113 MPFR_ASSERTD (MPFR_PREC (cache->x) == cprec); in mpfr_cache()
H A Dyn.c105 mpfr_init2 (t, MPFR_PREC(s)); in mpfr_yn_s3()
106 mpfr_init2 (u, MPFR_PREC(s)); in mpfr_yn_s3()
135 if (MPFR_EXP (u) + (mpfr_exp_t) MPFR_PREC (u) < MPFR_EXP (s) && in mpfr_yn_s3()
217 if (n == 0 && MPFR_EXP(z) < - (mpfr_exp_t) (MPFR_PREC(res) / 2)) in mpfr_yn()
223 prec = MPFR_PREC(res) + 10; in mpfr_yn()
255 inex = mpfr_prec_round (l, MPFR_PREC(res), r); in mpfr_yn()
256 inex2 = mpfr_prec_round (h, MPFR_PREC(res), r); in mpfr_yn()
271 if (n == 1 && MPFR_EXP(z) + 1 < - (mpfr_exp_t) MPFR_PREC(res)) in mpfr_yn()
281 prec = MPFR_PREC(res) + 10; in mpfr_yn()
299 if (MPFR_EXP(y) + 2 >= MPFR_PREC(y)) /* ulp(y) >= 1/4 */ in mpfr_yn()
[all …]
H A Dfmma.c32 mpfr_prec_t prec_z = MPFR_PREC(z); in mpfr_fmma_aux()
56 if (prec_z == MPFR_PREC(a) && prec_z == MPFR_PREC(b) && in mpfr_fmma_aux()
57 prec_z == MPFR_PREC(c) && prec_z == MPFR_PREC(d) && in mpfr_fmma_aux()
61 MPFR_PREC(u) = MPFR_PREC(v) = 2 * prec_z; in mpfr_fmma_aux()
H A Dfma.c126 precx = MPFR_PREC (x); in mpfr_fma()
127 precy = MPFR_PREC (y); in mpfr_fma()
138 MPFR_PREC(z) == precx && in mpfr_fma()
139 MPFR_PREC(s) == precx) in mpfr_fma()
146 MPFR_PREC(u) = MPFR_PREC(zz) = 2 * precx; in mpfr_fma()
152 if (MPFR_PREC(zz) <= GMP_NUMB_BITS) /* zz fits in one limb */ in mpfr_fma()
259 MAX (MPFR_PREC (z), MPFR_PREC (s) + 1)) in mpfr_fma()
261 MPFR_PREC (u) = MPFR_PREC_MIN; in mpfr_fma()
H A Dlngamma.c96 MPFR_GROUP_INIT_2 (group, MPFR_PREC (y), t1, t2); in mpfr_explgamma()
131 prec = MPFR_PREC (x); in unit_bit()
201 if (compared > 0 && MPFR_GET_EXP (z0) >= (mpfr_exp_t) MPFR_PREC(y) + 2) in GAMMA_FUNC()
209 mpfr_init2 (t, MPFR_PREC(y) >= 52 ? MPFR_PREC(y) + 10 : 62); in GAMMA_FUNC()
225 if (MPFR_GET_EXP(t) - MPFR_PREC(t) >= 62) in GAMMA_FUNC()
229 if (MPFR_CAN_ROUND (t, MPFR_PREC(t) - 3, MPFR_PREC(y), rnd)) in GAMMA_FUNC()
242 if (MPFR_GET_EXP (z0) <= - (mpfr_exp_t) MPFR_PREC(y)) in GAMMA_FUNC()
246 mpfr_prec_t prec = MPFR_PREC(y) + 14; in GAMMA_FUNC()
256 mpfr_init2 (h, MPFR_PREC(l)); in GAMMA_FUNC()
260 mpfr_init2 (h, MPFR_PREC(z0)); in GAMMA_FUNC()
[all …]
H A Drndna.c79 p = MPFR_PREC (rop) + 1; in mpfr_round_nearest_away_begin()
95 ext[OLD_PREC].pr = MPFR_PREC(rop); in mpfr_round_nearest_away_begin()
101 MPFR_PREC(tmp) = p; /* Set prec */ in mpfr_round_nearest_away_begin()
154 MPFR_PREC(rop) = ext[OLD_PREC].pr; in mpfr_round_nearest_away_end()
158 MPFR_ASSERTD(MPFR_PREC(tmp) == MPFR_PREC(rop)+1); in mpfr_round_nearest_away_end()
167 n = MPFR_PREC(rop); in mpfr_round_nearest_away_end()
H A Dsin_cos.c70 prec = MAX (MPFR_PREC (y), MPFR_PREC (z)); in mpfr_sin_cos()
178 if (!MPFR_CAN_ROUND (c, err, MPFR_PREC (z), rnd_mode)) in mpfr_sin_cos()
201 if (MPFR_CAN_ROUND (c, err, MPFR_PREC (y), rnd_mode)) in mpfr_sin_cos()
204 if (err < (mpfr_exp_t) MPFR_PREC (y)) in mpfr_sin_cos()
205 m += MPFR_PREC (y) - err; in mpfr_sin_cos()
475 MPFR_ASSERTD(MPFR_PREC(s) == MPFR_PREC(c)); in sincos_aux()
477 prec_s = MPFR_PREC(s); in sincos_aux()
479 mpfr_init2 (x2, MPFR_PREC(x)); in sincos_aux()
593 w = MPFR_PREC(c); in mpfr_sincos_fast()
595 w = MPFR_PREC(s); in mpfr_sincos_fast()
[all …]
H A Datan2.c123 mpfr_prec_t prec2 = MPFR_PREC (dest) + 10; in mpfr_atan2()
133 if (MPFR_CAN_ROUND (tmp2, MPFR_PREC (tmp2) - 2, in mpfr_atan2()
134 MPFR_PREC (dest), rnd_mode)) in mpfr_atan2()
163 mpfr_init2 (yoverx, MPFR_PREC (y)); in mpfr_atan2()
183 prec = MPFR_PREC (dest) + 3 + MPFR_INT_CEIL_LOG2 (MPFR_PREC (dest)); in mpfr_atan2()
236 if (MPFR_LIKELY (MPFR_CAN_ROUND (tmp, prec - 2, MPFR_PREC (dest), in mpfr_atan2()
264 if (MPFR_LIKELY (MPFR_CAN_ROUND (tmp, prec - e, MPFR_PREC (dest), in mpfr_atan2()
H A Derfc.c38 mpfr_prec_t prec = MPFR_PREC(y); in mpfr_erfc_asympt()
181 if ((MPFR_PREC(y) <= 7 && e >= 2) || /* x <= -2 */ in mpfr_erfc()
182 (MPFR_PREC(y) <= 25 && e >= 3) || /* x <= -4 */ in mpfr_erfc()
183 (MPFR_PREC(y) <= 120 && mpfr_cmp_si (x, -9) <= 0) || in mpfr_erfc()
212 mpfr_set_exp_t (u, MPFR_PREC (y), MPFR_RNDU); in mpfr_erfc()
226 prec = MPFR_PREC (y) + MPFR_INT_CEIL_LOG2 (MPFR_PREC (y)) + 3; in mpfr_erfc()
264 if (MPFR_LIKELY (MPFR_CAN_ROUND (tmp, prec - err, MPFR_PREC (y), rnd))) in mpfr_erfc()
H A Datanu.c105 if (expx >= 65 && expx - 1 >= MPFR_PREC(y) + 2) in mpfr_atanu()
107 prec = (MPFR_PREC(y) <= 63) ? 65 : MPFR_PREC(y) + 2; in mpfr_atanu()
118 MPFR_ASSERTD(mpfr_min_prec(tmp) > MPFR_PREC(y)); in mpfr_atanu()
127 prec = MPFR_PREC (y); in mpfr_atanu()
169 MPFR_PREC (y), rnd_mode))) in mpfr_atanu()
H A Deint.c45 mpfr_prec_t w = MPFR_PREC(y); in mpfr_eint_aux()
71 MPFR_ASSERTD (mpz_sizeinbase (m, 2) == MPFR_PREC (x)); /* since m != 0 */ in mpfr_eint_aux()
72 if (MPFR_PREC (x) > w) in mpfr_eint_aux()
74 e += MPFR_PREC (x) - w; in mpfr_eint_aux()
75 mpz_tdiv_q_2exp (m, m, MPFR_PREC (x) - w); /* one still has m != 0 */ in mpfr_eint_aux()
92 MPFR_ASSERTD (n <= MPFR_PREC (x)); in mpfr_eint_aux()
179 mpfr_prec_t p = MPFR_PREC(y); in mpfr_eint_asympt()
274 prec = MPFR_PREC (y) + 2 * MPFR_INT_CEIL_LOG2 (MPFR_PREC (y)) + 6; in mpfr_eint()
367 if (MPFR_LIKELY (MPFR_CAN_ROUND (tmp, prec - err, MPFR_PREC (y), rnd))) in mpfr_eint()
H A Dgamma.c46 return (MPFR_GET_EXP(x) <= 1) ? MPFR_PREC(x) + 2 - MPFR_GET_EXP(x) in mpfr_gamma_2_minus_x_exact()
47 : MPFR_PREC(x) + 1; in mpfr_gamma_2_minus_x_exact()
56 return MPFR_PREC(x) - MPFR_GET_EXP(x); in mpfr_gamma_1_minus_x_exact()
58 return MPFR_PREC(x) + 1 - MPFR_GET_EXP(x); in mpfr_gamma_1_minus_x_exact()
61 return MPFR_PREC(x) + 1; in mpfr_gamma_1_minus_x_exact()
204 <= -2 * (mpfr_exp_t) MAX(MPFR_PREC(x), MPFR_PREC(gamma))) in mpfr_gamma()
271 mpfr_prec_t p = MPFR_PREC(gamma); in mpfr_gamma()
390 realprec = MPFR_PREC (gamma); in mpfr_gamma()
464 MPFR_PREC(gamma), rnd_mode))) in mpfr_gamma()
H A Dset.c46 else if (MPFR_PREC (b) == MPFR_PREC (a)) in mpfr_set4()
59 MPFR_RNDRAW (inex, a, MPFR_MANT (b), MPFR_PREC (b), rnd_mode, signb, in mpfr_set4()
114 mpfr_prec_t p = MPFR_PREC(s); in mpfr_set_1_2()
128 MPFR_ASSERTD(MPFR_PREC(u) == 2 * p); in mpfr_set_1_2()
134 if (MPFR_PREC(u) <= GMP_NUMB_BITS) in mpfr_set_1_2()
H A Dswap.c35 p1 = MPFR_PREC(u); in mpfr_swap()
36 p2 = MPFR_PREC(v); in mpfr_swap()
37 MPFR_PREC(v) = p1; in mpfr_swap()
38 MPFR_PREC(u) = p2; in mpfr_swap()
H A Datan2u.c79 prec = (MPFR_PREC(z) + 2 > ULSIZE) ? MPFR_PREC(z) + 2 : ULSIZE; in mpfr_atan2u_aux3()
103 prec = (MPFR_PREC(z) > ULSIZE) ? MPFR_PREC(z) + 2 : ULSIZE + 2; in mpfr_atan2u_aux4()
140 MPFR_ASSERTN(e < (ULSIZE - 1) - MPFR_PREC(z)); in mpfr_atan2u_underflow()
157 mpfr_exp_t ulpz = (ULSIZE - 2) - MPFR_PREC(z); /* ulp(u/4) <= 2^ulpz */ in mpfr_atan2u_overflow()
284 prec = MPFR_PREC (z); in mpfr_atan2u()
344 MPFR_PREC (z), rnd_mode))) in mpfr_atan2u()
H A Dacosu.c89 prec = MPFR_PREC (y); in mpfr_acosu()
105 prec = (MPFR_PREC(y) <= 63) ? 65 : MPFR_PREC(y) + 2; in mpfr_acosu()
118 MPFR_ASSERTD(mpfr_min_prec(tmp) > MPFR_PREC(y)); in mpfr_acosu()
148 MPFR_PREC (y), rnd_mode))) in mpfr_acosu()
H A Dacos.c63 mpfr_init2 (xp, MPFR_PREC (x)); in mpfr_acos()
95 prec = MPFR_PREC (acos); in mpfr_acos()
106 if (MPFR_PREC (acos) >= MPFR_PREC (x) && MPFR_GET_EXP (x) < 0) in mpfr_acos()
132 MPFR_PREC (acos), rnd_mode))) in mpfr_acos()
H A Derf.c67 if (MPFR_EXP(x) < - (mpfr_exp_t) (MPFR_PREC(y) / 2)) in mpfr_erf()
78 mpfr_init2 (l, MPFR_PREC(y) + 17); in mpfr_erf()
79 mpfr_init2 (h, MPFR_PREC(y) + 17); in mpfr_erf()
97 inex = mpfr_prec_round (l, MPFR_PREC(y), rnd_mode); in mpfr_erf()
98 inex2 = mpfr_prec_round (h, MPFR_PREC(y), rnd_mode); in mpfr_erf()
116 large = mpfr_cmp_ui (xf, MPFR_PREC (y) + 1) > 0; in mpfr_erf()
195 n = MPFR_PREC (res); /* target precision */ in mpfr_erf_0()
H A Dround_near_x.c172 if (!(err > MPFR_PREC (y) + 1 in mpfr_round_near_x()
173 && (err > MPFR_PREC (v) in mpfr_round_near_x()
176 MPFR_PREC (y) + (rnd == MPFR_RNDN))))) in mpfr_round_near_x()
184 MPFR_RNDRAW_GEN (inexact, y, MPFR_MANT (v), MPFR_PREC (v), rnd, sign, in mpfr_round_near_x()
H A Dfrac.c62 uq = MPFR_PREC(u); in mpfr_frac()
98 t = (mp_size_t) (MPFR_PREC(r) - 1) / GMP_NUMB_BITS < un ? in mpfr_frac()
106 tn = (MPFR_PREC(t) - 1) / GMP_NUMB_BITS; in mpfr_frac()
133 MPFR_IS_NEG (r), MPFR_PREC (r), rnd_mode, in mpfr_frac()
H A Dget_z_2exp.c74 MPFR_UNSIGNED_MINUS_MODULO (sh, MPFR_PREC (f)); in mpfr_get_z_2exp()
87 < (mpfr_uexp_t) MPFR_PREC (f))) in mpfr_get_z_2exp()
95 return MPFR_GET_EXP (f) - MPFR_PREC (f); in mpfr_get_z_2exp()
H A Dgrandom.c43 tprec0 = MPFR_PREC (rop1); in mpfr_grandom()
45 tprec0 = MAX (MPFR_PREC (rop1), MPFR_PREC (rop2)); in mpfr_grandom()
152 if (MPFR_CAN_ROUND (r1, tprec - 2, MPFR_PREC (rop1), rnd)) in mpfr_grandom()
161 if (MPFR_CAN_ROUND (r2, tprec - 2, MPFR_PREC (rop2), rnd)) in mpfr_grandom()

123456