Searched refs:rnd_mode (Results 1 - 25 of 239) sorted by relevance

12345678910

/netbsd-current/external/lgpl3/mpfr/dist/src/
H A Dset_rnd.c29 mpfr_set_default_rounding_mode (mpfr_rnd_t rnd_mode)
31 if (rnd_mode >= MPFR_RNDN && rnd_mode < MPFR_RND_MAX)
32 __gmpfr_default_rounding_mode = rnd_mode;
H A Dset_flt.c26 mpfr_set_flt (mpfr_ptr r, float f, mpfr_rnd_t rnd_mode) argument
32 return mpfr_set_d (r, (double) f, rnd_mode);
H A Dprint_rnd_mode.c29 mpfr_print_rnd_mode (mpfr_rnd_t rnd_mode) argument
34 switch (rnd_mode)
H A Dset_si.c27 mpfr_set_si (mpfr_ptr x, long i, mpfr_rnd_t rnd_mode) argument
29 return mpfr_set_si_2exp (x, i, 0, rnd_mode);
H A Dexp10.c26 mpfr_exp10 (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) argument
28 return mpfr_ui_pow (y, 10, x, rnd_mode);
H A Dset_z.c27 mpfr_set_z (mpfr_ptr f, mpz_srcptr z, mpfr_rnd_t rnd_mode) argument
29 return mpfr_set_z_2exp (f, z, 0, rnd_mode);
H A Dset_ui.c27 mpfr_set_ui (mpfr_ptr x, unsigned long i, mpfr_rnd_t rnd_mode) argument
29 return mpfr_set_ui_2exp (x, i, 0, rnd_mode);
H A Dminmax.c33 mpfr_min (mpfr_ptr z, mpfr_srcptr x, mpfr_srcptr y, mpfr_rnd_t rnd_mode) argument
43 return mpfr_set(z, y, rnd_mode);
45 return mpfr_set(z, x, rnd_mode);
49 return mpfr_set(z, x, rnd_mode);
51 return mpfr_set(z, y, rnd_mode);
55 return mpfr_set(z, x, rnd_mode);
57 return mpfr_set(z, y, rnd_mode);
67 mpfr_max (mpfr_ptr z, mpfr_srcptr x, mpfr_srcptr y, mpfr_rnd_t rnd_mode) argument
77 return mpfr_set(z, y, rnd_mode);
79 return mpfr_set(z, x, rnd_mode);
[all...]
H A Dsi_op.c31 mpfr_add_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode) argument
37 mpfr_get_prec(x), mpfr_log_prec, x, u, rnd_mode),
42 res = mpfr_add_ui (y, x, u, rnd_mode);
44 res = mpfr_sub_ui (y, x, - (unsigned long) u, rnd_mode);
50 mpfr_sub_si (mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode) argument
56 mpfr_get_prec(x), mpfr_log_prec, x, u, rnd_mode),
61 res = mpfr_sub_ui (y, x, u, rnd_mode);
63 res = mpfr_add_ui (y, x, - (unsigned long) u, rnd_mode);
69 mpfr_si_sub (mpfr_ptr y, long int u, mpfr_srcptr x, mpfr_rnd_t rnd_mode) argument
75 mpfr_get_prec(x), mpfr_log_prec, x, u, rnd_mode),
93 mpfr_mul_si(mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode) argument
117 mpfr_div_si(mpfr_ptr y, mpfr_srcptr x, long int u, mpfr_rnd_t rnd_mode) argument
140 mpfr_si_div(mpfr_ptr y, long int u, mpfr_srcptr x, mpfr_rnd_t rnd_mode) argument
[all...]
H A Ddiv_2exp.c30 mpfr_div_2exp (mpfr_ptr y, mpfr_srcptr x, unsigned long int n, mpfr_rnd_t rnd_mode) argument
32 return mpfr_div_2ui (y, x, n, rnd_mode);
H A Dmul_2exp.c30 mpfr_mul_2exp (mpfr_ptr y, mpfr_srcptr x, unsigned long int n, mpfr_rnd_t rnd_mode) argument
32 return mpfr_mul_2ui (y, x, n, rnd_mode);
H A Ddiv_d.c27 mpfr_div_d (mpfr_ptr a, mpfr_srcptr b, double c, mpfr_rnd_t rnd_mode) argument
36 rnd_mode),
42 inexact = mpfr_set_d (d, c, rnd_mode);
46 inexact = mpfr_div (a, b, d, rnd_mode);
50 return mpfr_check_range (a, inexact, rnd_mode);
H A Dsub_d.c27 mpfr_sub_d (mpfr_ptr a, mpfr_srcptr b, double c, mpfr_rnd_t rnd_mode) argument
36 mpfr_get_prec (b), mpfr_log_prec, b, c, rnd_mode),
42 inexact = mpfr_set_d (d, c, rnd_mode);
46 inexact = mpfr_sub (a, b, d, rnd_mode);
50 return mpfr_check_range (a, inexact, rnd_mode);
H A Dd_sub.c27 mpfr_d_sub (mpfr_ptr a, double b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) argument
35 ("b=%.20g c[%Pu]=%.*Rg rnd=%d", b, mpfr_get_prec (c), mpfr_log_prec, c, rnd_mode),
41 inexact = mpfr_set_d (d, b, rnd_mode);
45 inexact = mpfr_sub (a, d, c, rnd_mode);
49 return mpfr_check_range (a, inexact, rnd_mode);
H A Dd_div.c27 mpfr_d_div (mpfr_ptr a, double b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) argument
35 ("b=%.20g c[%Pu]=%.*Rg rnd=%d", b, mpfr_get_prec (c), mpfr_log_prec, c, rnd_mode),
41 inexact = mpfr_set_d (d, b, rnd_mode);
45 inexact = mpfr_div (a, d, c, rnd_mode);
49 return mpfr_check_range (a, inexact, rnd_mode);
H A Ddiv_2ui.c26 mpfr_div_2ui (mpfr_ptr y, mpfr_srcptr x, unsigned long n, mpfr_rnd_t rnd_mode) argument
32 rnd_mode),
36 return mpfr_set (y, x, rnd_mode);
42 MPFR_SETRAW (inexact, y, x, exp, rnd_mode);
50 if (rnd_mode == MPFR_RNDN &&
54 rnd_mode = MPFR_RNDZ;
55 return mpfr_underflow (y, rnd_mode, MPFR_SIGN (y));
H A Dsub.c26 mpfr_sub (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mpfr_rnd_t rnd_mode) argument
31 mpfr_get_prec (c), mpfr_log_prec, c, rnd_mode),
65 int sign = rnd_mode != MPFR_RNDD
73 return mpfr_neg (a, c, rnd_mode);
77 return mpfr_set (a, b, rnd_mode);
86 return mpfr_sub1 (a, b, c, rnd_mode);
90 rnd_mode = MPFR_INVERT_RND (rnd_mode);
91 inexact = mpfr_add1 (a, c, b, rnd_mode);
96 return mpfr_add1 (a, b, c, rnd_mode);
[all...]
H A Dget_flt.c35 mpfr_get_flt (mpfr_srcptr src, mpfr_rnd_t rnd_mode) argument
46 return (float) mpfr_get_d (src, rnd_mode);
52 if (MPFR_UNLIKELY(rnd_mode == MPFR_RNDA))
53 rnd_mode = negative ? MPFR_RNDD : MPFR_RNDU;
70 (rnd_mode == MPFR_RNDD ||
71 (rnd_mode == MPFR_RNDN && mpfr_cmp_si_2exp (src, -1, -150) < 0)
73 (rnd_mode == MPFR_RNDU ||
74 (rnd_mode == MPFR_RNDN && mpfr_cmp_si_2exp (src, 1, -150) > 0)
84 (rnd_mode == MPFR_RNDZ || rnd_mode
[all...]
H A Dcsch.c58 if (rnd_mode == MPFR_RNDA) \
59 rnd_mode = (signx > 0) ? MPFR_RNDU : MPFR_RNDD; \
60 if (rnd_mode == MPFR_RNDU || (rnd_mode == MPFR_RNDZ && signx < 0)) \
66 else if (rnd_mode == MPFR_RNDD || rnd_mode == MPFR_RNDZ) \
H A Dmul_2ui.c26 mpfr_mul_2ui (mpfr_ptr y, mpfr_srcptr x, unsigned long int n, mpfr_rnd_t rnd_mode) argument
32 mpfr_get_prec (x), mpfr_log_prec, x, n, rnd_mode),
36 inexact = (y != x) ? mpfr_set (y, x, rnd_mode) : 0;
45 return mpfr_overflow (y, rnd_mode, MPFR_SIGN (y));
H A Dcompound.c29 mpfr_compound_near_one (mpfr_ptr y, int s, mpfr_rnd_t rnd_mode) argument
31 mpfr_set_ui (y, 1, rnd_mode); /* exact */
32 if (rnd_mode == MPFR_RNDN || rnd_mode == MPFR_RNDF
33 || (s > 0 && (rnd_mode == MPFR_RNDZ || rnd_mode == MPFR_RNDD))
34 || (s < 0 && (rnd_mode == MPFR_RNDA || rnd_mode == MPFR_RNDU)))
55 mpfr_compound_si (mpfr_ptr y, mpfr_srcptr x, long n, mpfr_rnd_t rnd_mode) argument
66 mpfr_get_prec(x), mpfr_log_prec, x, n, rnd_mode),
[all...]
H A Dmul_2si.c26 mpfr_mul_2si (mpfr_ptr y, mpfr_srcptr x, long int n, mpfr_rnd_t rnd_mode) argument
32 mpfr_get_prec (x), mpfr_log_prec, x, n, rnd_mode),
37 return mpfr_set (y, x, rnd_mode);
41 MPFR_SETRAW (inexact, y, x, exp, rnd_mode);
44 return mpfr_overflow (y, rnd_mode, MPFR_SIGN(y));
48 if (rnd_mode == MPFR_RNDN &&
53 rnd_mode = MPFR_RNDZ;
54 return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y));
H A Dneg.c26 mpfr_neg (mpfr_ptr a, mpfr_srcptr b, mpfr_rnd_t rnd_mode) argument
29 return mpfr_set4 (a, b, rnd_mode, -MPFR_SIGN(b));
H A Dfms.c32 mpfr_rnd_t rnd_mode)
37 return mpfr_fma (s, x, y, minus_z, rnd_mode);
31 mpfr_fms(mpfr_ptr s, mpfr_srcptr x, mpfr_srcptr y, mpfr_srcptr z, mpfr_rnd_t rnd_mode) argument
/netbsd-current/external/lgpl3/mpfr/dist/tests/
H A Dtsqrt_ui.c26 check (unsigned long a, mpfr_rnd_t rnd_mode, const char *qs) argument
31 mpfr_sqrt_ui (q, a, rnd_mode);
34 printf ("mpfr_sqrt_ui failed for a=%lu, rnd_mode=%s\n",
35 a, mpfr_print_rnd_mode (rnd_mode));

Completed in 210 milliseconds

12345678910