GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
/* __gmp_doprnt_integer_ios -- integer formatted output to an ostream.12THE FUNCTIONS IN THIS FILE ARE FOR INTERNAL USE ONLY. THEY'RE ALMOST3CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN4FUTURE GNU MP RELEASES.56Copyright 2001 Free Software Foundation, Inc.78This file is part of the GNU MP Library.910The GNU MP Library is free software; you can redistribute it and/or modify11it under the terms of the GNU Lesser General Public License as published by12the Free Software Foundation; either version 2.1 of the License, or (at your13option) any later version.1415The GNU MP Library is distributed in the hope that it will be useful, but16WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY17or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public18License for more details.1920You should have received a copy of the GNU Lesser General Public License21along with the GNU MP Library; see the file COPYING.LIB. If not, write to22the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,23MA 02110-1301, USA. */2425#include <iostream>26#include <cstdarg> /* for va_list and hence doprnt_funs_t */27#include <cstring> /* for strlen */2829#include "gmp.h"30#include "gmp-impl.h"3132using namespace std;333435/* The gmp_asprintf support routines never give an error, so36__gmp_doprnt_integer shouldn't fail and it's return can just be checked37with an ASSERT. */3839ostream&40__gmp_doprnt_integer_ostream (ostream &o, struct doprnt_params_t *p,41char *s)42{43struct gmp_asprintf_t d;44char *result;45int ret;4647/* don't show leading zeros the way printf does */48p->prec = -1;4950GMP_ASPRINTF_T_INIT (d, &result);51ret = __gmp_doprnt_integer (&__gmp_asprintf_funs_noformat, &d, p, s);52ASSERT (ret != -1);53__gmp_asprintf_final (&d);54(*__gmp_free_func) (s, strlen(s)+1);5556gmp_allocated_string t (result);57return o.write (t.str, t.len);58}596061