Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Virtualization:Tests
perl-Math-GMP
perl-Math-GMP.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File perl-Math-GMP.spec of Package perl-Math-GMP
# # spec file for package perl-Math-GMP # # Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Math-GMP Name: perl-Math-GMP Version: 2.25 Release: 0 License: LGPL-2.1-or-later Summary: High speed arbitrary size integer math URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Alien::GMP) >= 1.08 %{perl_requires} # MANUAL BEGIN BuildRequires: gmp-devel # MANUAL END %description Math::GMP was designed to be a drop-in replacement both for Math::BigInt and for regular integer arithmetic. Unlike BigInt, though, Math::GMP uses the GNU gmp library for all of its calculations, as opposed to straight Perl functions. This can result in speed improvements. The downside is that this module requires a C compiler to install -- a small tradeoff in most cases. Also, this module is not 100% compatible with Math::BigInt. A Math::GMP object can be used just as a normal numeric scalar would be -- the module overloads most of the normal arithmetic operators to provide as seamless an interface as possible. However, if you need a perfect interface, you can do the following: use Math::GMP qw(:constant); $n = 2 ** (256 * 1024); print "n is $n\n"; This would fail without the ':constant' since Perl would use normal doubles to compute the 250,000 bit number, and thereby overflow it into meaninglessness (smaller exponents yield less accurate data due to floating point rounding). %prep %autosetup -n %{cpan_name}-%{version} %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README.md %license COPYING.LIB LICENSE %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor