From 2cfac2b7cba728c3b0da5d3caa3579f59ed1e6d4 Mon Sep 17 00:00:00 2001 From: Fredrik Johansson Date: Fri, 21 Sep 2012 13:52:39 +0200 Subject: [PATCH] refactor into more fmpr helper functions --- doc/fmpr.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/fmpr.txt b/doc/fmpr.txt index f1c52b27..7a5561ce 100644 --- a/doc/fmpr.txt +++ b/doc/fmpr.txt @@ -294,6 +294,13 @@ void fmpr_get_fmpz_2exp(fmpz_t man, fmpz_t exp, const fmpr_t x); If x is zero, both man and exp are set to zero. If x is infinite or NaN, the result is undefined. +int fmpr_get_fmpz_fixed_fmpz(fmpz_t y, const fmpr_t x, const fmpz_t e) + +int fmpr_get_fmpz_fixed_si(fmpz_t y, const fmpr_t x, long e) + + Converts x to a mantissa with predetermined exponent, i.e. computes + an integer y such that $y \times 2^e \approx x$, truncating if necessary. + Returns 0 if exact and 1 if truncation occurred. *******************************************************************************