GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
#!/usr/bin/perl -w12# Some sample GMP module operations34# Copyright 2001, 2004 Free Software Foundation, Inc.5#6# This file is part of the GNU MP Library.7#8# The GNU MP Library is free software; you can redistribute it and/or modify9# it under the terms of either:10#11# * the GNU Lesser General Public License as published by the Free12# Software Foundation; either version 3 of the License, or (at your13# option) any later version.14#15# or16#17# * the GNU General Public License as published by the Free Software18# Foundation; either version 2 of the License, or (at your option) any19# later version.20#21# or both in parallel, as here.22#23# The GNU MP Library is distributed in the hope that it will be useful, but24# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY25# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License26# for more details.27#28# You should have received copies of the GNU General Public License and the29# GNU Lesser General Public License along with the GNU MP Library. If not,30# see https://www.gnu.org/licenses/.3132use strict;333435use GMP;36print "using GMP module $GMP::VERSION and GMP library ",GMP::version(),"\n";373839use GMP::Mpz qw(:all);40print "the 200th fibonacci number is ", fib(200), "\n";41print "next prime after 10**30 is (probably) ", nextprime(mpz(10)**30), "\n";424344use GMP::Mpq qw(:constants);45print "the 7th harmonic number is ", 1+1/2+1/3+1/4+1/5+1/6+1/7, "\n";46use GMP::Mpq qw(:noconstants);474849use GMP::Mpf qw(mpf);50my $f = mpf(1,180);51$f >>= 180;52$f += 1;53print "a sample mpf is $f\n";545556