SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Number-Fraction rpm build for : OpenSuSE. For other distributions click perl-Number-Fraction.

Name : perl-Number-Fraction
Version : 3.1.0 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : lp154.1.1 Date : 2024-02-26 07:06:22
Group : Unspecified Source RPM : perl-Number-Fraction-3.1.0-lp154.1.1.src.rpm
Size : 0.03 MB
Packager : https://www_suse_com/
Summary : Perl extension to model fractions
Description :
Number::Fraction allows you to work with fractions (i.e. rational numbers)
in your Perl programs in a very natural way.

It was originally written as a demonstration of the techniques of
overloading.

If you use the module in your program in the usual way

use Number::Fraction;

you can then create fraction objects using \'Number::Fraction-\'new> in a
number of ways.

my $f1 = Number::Fraction->new(1, 2);

creates a fraction with a numerator of 1 and a denominator of 2.

my $fm = Number::Fraction->new(1, 2, 3);

creates a fraction from an integer of 1, a numerator of 2 and a denominator
of 3; which results in a fraction of 5/3 since fractions are normalised.

my $f2 = Number::Fraction->new(\'1/2\');

does the same thing but from a string constant.

my $f3 = Number::Fraction->new($f1);

makes \'$f3\' a copy of \'$f1\'

my $f4 = Number::Fraction->new; # 0/1

creates a fraction with a denominator of 0 and a numerator of 1.

If you use the alternative syntax of

use Number::Fraction \':constants\';

then Number::Fraction will automatically create fraction objects from
string constants in your program. Any time your program contains a string
constant of the form \'\\d+/\\d+\' then that will be automatically replaced
with the equivalent fraction object. For example

my $f1 = \'1/2\';

Having created fraction objects you can manipulate them using most of the
normal mathematical operations.

my $one = $f1 + $f2;
my $half = $one - $f1;

Additionally, whenever a fraction object is evaluated in a string context,
it will return a string in the format x/y. When a fraction object is
evaluated in a numerical context, it will return a floating point
representation of its value.

Fraction objects will always \"normalise\" themselves. That is, if you create
a fraction of \'2/4\', it will silently be converted to \'1/2\'.

RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-N/15.4/noarch

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Number-Fraction-3.1.0-lp154.1.1.noarch.rpm
     

Provides :
perl(Number::Fraction)
perl-Number-Fraction

Requires :
perl(:MODULE_COMPAT_5.26.1)
perl(Moo)
perl(Types::Standard)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.26.1/Number
/usr/lib/perl5/vendor_perl/5.26.1/Number/Fraction.pm
/usr/share/doc/packages/perl-Number-Fraction
/usr/share/doc/packages/perl-Number-Fraction/Changes.md
/usr/share/doc/packages/perl-Number-Fraction/Changes.old
/usr/share/doc/packages/perl-Number-Fraction/README
/usr/share/man/man3/Number::Fraction.3pm.gz

 
ICM