Lines Matching refs:cache
29 mpfr_init_cache (mpfr_cache_t cache, int (*func)(mpfr_ptr, mpfr_rnd_t))
31 MPFR_PREC (cache->x) = 0; /* Invalid prec to detect that the cache is not
33 cache->func = func;
38 mpfr_clear_cache (mpfr_cache_t cache) in mpfr_clear_cache() argument
40 if (MPFR_PREC (cache->x) != 0) in mpfr_clear_cache()
41 mpfr_clear (cache->x); in mpfr_clear_cache()
42 MPFR_PREC (cache->x) = 0; in mpfr_clear_cache()
46 mpfr_cache (mpfr_ptr dest, mpfr_cache_t cache, mpfr_rnd_t rnd) in mpfr_cache() argument
49 mpfr_prec_t pold = MPFR_PREC (cache->x); in mpfr_cache()
61 mpfr_init2 (cache->x, prec); in mpfr_cache()
66 mpfr_set_prec (cache->x, pold); in mpfr_cache()
67 cache->inexact = (*cache->func) (cache->x, MPFR_RNDN); in mpfr_cache()
79 MPFR_ASSERTN (MPFR_IS_POS (cache->x)); /* TODO... */ in mpfr_cache()
80 sign = MPFR_SIGN (cache->x); in mpfr_cache()
81 MPFR_SET_EXP (dest, MPFR_GET_EXP (cache->x)); in mpfr_cache()
86 MPFR_MANT (cache->x), pold, rnd, sign, in mpfr_cache()
87 if (MPFR_UNLIKELY (cache->inexact == 0)) in mpfr_cache()
97 else if (cache->inexact < 0) in mpfr_cache()
108 if (MPFR_LIKELY (cache->inexact != 0)) in mpfr_cache()
116 inexact = cache->inexact; in mpfr_cache()
128 inexact = cache->inexact; in mpfr_cache()
138 inexact = cache->inexact; in mpfr_cache()