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 either:8#9# * the GNU Lesser General Public License as published by the Free10# Software Foundation; either version 3 of the License, or (at your11# option) any later version.12#13# or14#15# * the GNU General Public License as published by the Free Software16# Foundation; either version 2 of the License, or (at your option) any17# later version.18#19# or both in parallel, as here.20#21# The GNU MP Library is distributed in the hope that it will be useful, but22# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY23# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License24# for more details.25#26# You should have received copies of the GNU General Public License and the27# GNU Lesser General Public License along with the GNU MP Library. If not,28# see https://www.gnu.org/licenses/.293031# The following uses of :constants seem to provoke segvs in perl 5.005_03,32# so they're kept separate file to be run only on suitable perl versions.333435use GMP::Mpz qw(:constants);36{37my $a = 123;38ok (UNIVERSAL::isa ($a, "GMP::Mpz"));39}40use GMP::Mpz qw(:noconstants);4142use GMP::Mpq qw(:constants);43{44my $a = 123;45ok (UNIVERSAL::isa ($a, "GMP::Mpq"));46}47use GMP::Mpq qw(:noconstants);4849use GMP::Mpf qw(:constants);50{51my $a = 123;52ok (UNIVERSAL::isa ($a, "GMP::Mpf"));53}54use GMP::Mpf qw(:noconstants);555657# compiled constants unchanged by clrbit etc when re-executed58foreach (0, 1, 2) {59use GMP::Mpz qw(:constants);60my $a = 15;61my $b = 6;62use GMP::Mpz qw(:noconstants);63clrbit ($a, 0);64ok ($a == 14);65setbit ($b, 0);66ok ($b == 7);67}68691;707172# Local variables:73# perl-indent-level: 274# End:757677