1 /* 2 Copyright (C) 2010 William Hart 3 Copyright (C) 2010 Sebastian Pancratz 4 5 This file is part of FLINT. 6 7 FLINT is free software: you can redistribute it and/or modify it under 8 the terms of the GNU Lesser General Public License (LGPL) as published 9 by the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version. See <http://www.gnu.org/licenses/>. 11 */ 12 13 #include <gmp.h> 14 #include "flint.h" 15 #include "fmpz.h" 16 #include "fmpz_vec.h" 17 18 void _fmpz_vec_content(fmpz_t res,const fmpz * vec,slong len)19_fmpz_vec_content(fmpz_t res, const fmpz * vec, slong len) 20 { 21 fmpz_zero(res); 22 while (len--) 23 fmpz_gcd(res, res, vec + len); 24 } 25