mpfr_vec.h – vectors of MPFR floating-point numbers¶
Memory management¶
-
mpfr_ptr _mpfr_vec_init(slong len, flint_bitcnt_t prec)¶
Returns a vector of the given length of initialised
mpfr’s with the given exact precision.
Arithmetic¶
-
void _mpfr_vec_set(mpfr_ptr vec1, mpfr_srcptr vec2, slong len)¶
Copies the vector
vec2of the given length intovec1. No check is made to ensurevec1andvec2are different.
-
void _mpfr_vec_add(mpfr_ptr res, mpfr_srcptr vec1, mpfr_srcptr vec2, slong len)¶
Adds the given vectors of the given length together and stores the result in
res.
-
void _mpfr_vec_scalar_mul_mpfr(mpfr_ptr res, mpfr_srcptr vec, slong len, mpfr_t c)¶
Multiplies the vector with given length by the scalar \(c\) and sets
resto the result.
-
void _mpfr_vec_scalar_mul_2exp(mpfr_ptr res, mpfr_srcptr vec, slong len, flint_bitcnt_t exp)¶
Multiplies the given vector of the given length by
2^exp.