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 either:89* the GNU Lesser General Public License as published by the Free10Software Foundation; either version 3 of the License, or (at your11option) any later version.1213or1415* the GNU General Public License as published by the Free Software16Foundation; either version 2 of the License, or (at your option) any17later version.1819or both in parallel, as here.2021The GNU MP Library is distributed in the hope that it will be useful, but22WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY23or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License24for more details.2526You should have received copies of the GNU General Public License and the27GNU Lesser General Public License along with the GNU MP Library. If not,28see https://www.gnu.org/licenses/. */2930#include <cctype>31#include <iostream>32#include <string>33#include "gmp.h"34#include "gmp-impl.h"3536using namespace std;373839// For g++ libstdc++ parsing see num_get<chartype,initer>::_M_extract_int in40// include/bits/locale_facets.tcc.4142istream &43operator>> (istream &i, mpz_ptr z)44{45char c = 0;46i.get(c); // start reading4748if (i.flags() & ios::skipws) // skip initial whitespace49{50#if HAVE_STD__LOCALE51const ctype<char>& ct = use_facet< ctype<char> >(i.getloc());52#define cxx_isspace(c) (ct.is(ctype_base::space,(c)))53#else54#define cxx_isspace(c) isspace(c)55#endif5657while (cxx_isspace(c) && i.get(c))58;59}6061return __gmpz_operator_in_nowhite (i, z, c);62}636465