GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/* operator<< -- mpz formatted output to an ostream.12Copyright 2001 Free Software Foundation, Inc.34This file is part of the GNU MP Library.56The GNU MP Library is free software; you can redistribute it and/or modify7it under the terms of the GNU Lesser General Public License as published by8the Free Software Foundation; either version 2.1 of the License, or (at your9option) any later version.1011The GNU MP Library is distributed in the hope that it will be useful, but12WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY13or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public14License for more details.1516You should have received a copy of the GNU Lesser General Public License17along with the GNU MP Library; see the file COPYING.LIB. If not, write to18the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,19MA 02110-1301, USA. */2021#include <iostream>22#include <stdarg.h> /* for va_list and hence doprnt_funs_t */23#include <string.h>2425#include "gmp.h"26#include "gmp-impl.h"2728using namespace std;293031ostream&32operator<< (ostream &o, mpz_srcptr z)33{34struct doprnt_params_t param;35__gmp_doprnt_params_from_ios (¶m, o);36return __gmp_doprnt_integer_ostream (o, ¶m,37mpz_get_str (NULL, param.base, z));38}394041