GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
# GMP perl module tests (part 2)12# Copyright 2001 Free Software Foundation, Inc.3#4# This file is part of the GNU MP Library.5#6# The GNU MP Library is free software; you can redistribute it and/or modify7# it under the terms of the GNU Lesser General Public License as published8# by the Free Software Foundation; either version 2.1 of the License, or (at9# your option) any later version.10#11# The GNU MP Library is distributed in the hope that it will be useful, but12# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY13# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public14# License for more details.15#16# You should have received a copy of the GNU Lesser General Public License17# along with the GNU MP Library; see the file COPYING.LIB. If not, write to18# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,19# MA 02110-1301, USA.202122# The following uses of :constants seem to provoke segvs in perl 5.005_03,23# so they're kept separate file to be run only on suitable perl versions.242526use GMP::Mpz qw(:constants);27{28my $a = 123;29ok (UNIVERSAL::isa ($a, "GMP::Mpz"));30}31use GMP::Mpz qw(:noconstants);3233use GMP::Mpq qw(:constants);34{35my $a = 123;36ok (UNIVERSAL::isa ($a, "GMP::Mpq"));37}38use GMP::Mpq qw(:noconstants);3940use GMP::Mpf qw(:constants);41{42my $a = 123;43ok (UNIVERSAL::isa ($a, "GMP::Mpf"));44}45use GMP::Mpf qw(:noconstants);464748# compiled constants unchanged by clrbit etc when re-executed49foreach (0, 1, 2) {50use GMP::Mpz qw(:constants);51my $a = 15;52my $b = 6;53use GMP::Mpz qw(:noconstants);54clrbit ($a, 0);55ok ($a == 14);56setbit ($b, 0);57ok ($b == 7);58}59601;616263# Local variables:64# perl-indent-level: 265# End:666768