GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/* operator>> -- C++-style input of mpz_t.12Copyright 2001, 2003 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 <cctype>22#include <iostream>23#include <string>24#include "gmp.h"25#include "gmp-impl.h"2627using namespace std;282930// For g++ libstdc++ parsing see num_get<chartype,initer>::_M_extract_int in31// include/bits/locale_facets.tcc.3233istream &34operator>> (istream &i, mpz_ptr z)35{36char c = 0;37i.get(c); // start reading3839if (i.flags() & ios::skipws) // skip initial whitespace40{41#if HAVE_STD__LOCALE42const ctype<char>& ct = use_facet< ctype<char> >(i.getloc());43#define cxx_isspace(c) (ct.is(ctype_base::space,(c)))44#else45#define cxx_isspace(c) isspace(c)46#endif4748while (cxx_isspace(c) && i.get(c))49;50}5152return __gmpz_operator_in_nowhite (i, z, c);53}545556