SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

 
 

perl-Math-RPN rpm build for : openSUSE Tumbleweed. For other distributions click perl-Math-RPN.

Name : perl-Math-RPN
Version : 1.11 Vendor : obs://build_opensuse_org/devel:languages:perl
Release : 7.10 Date : 2017-08-04 16:43:46
Group : Development/Libraries/Perl Source RPM : perl-Math-RPN-1.11-7.10.src.rpm
Size : 0.03 MB
Packager : (none)
Summary : Perl extension for Reverse Polish Math Expression Evaluation
Description :
The rpn function will take a scalar or list of sclars which contain an RPN
expression as a set of comma delimited values and operators, and return the
result or stack, depending on context. If the function is called in an
array context, it will return the entire remaining stack. If it is called
in a scalar context, it will return the top item of the stack. In a scalar
context, if more than one value remains on the stack, a warning will be
sent to STDERR.

In the event of an error, an error message will be sent to STDERR, and rpn
will return undef.

The expression can contain any combination of values and operators. Any
token which is not an operator is assumed to be a value to be pushed onto
the stack.

An explanation of Reverse Polish Notation is beyond the scope of this
document, but it I will describe it briefly as a stack-based way of writing
mathematical expressions. This has the advantage of eliminating the need
for parenthesis and simplifying parsing for computers vs. normal algebraic
notation at a slight cost in the ability of humans to easily comprehend the
expressions.

This evaluator works by cycling through the expression from left to right.
As each token is encountered, it is checked against the list of operators.
If it matches, then a check is performed for stack underflow. If the stack
has not underflowed, the operation is performed by removing the required
number of operands from the top of the stack. The result is then pushed on
to the stack. Operations for which order is significant (-,/,%,etc.) are
processed such that the top item on the stack is treated as the right
operand, and the next item down is treated as the left operand. Thus,
\"5,3,-\" would yield 2, not -2. If the token does not match any of the known
operators, the token is blindly pushed onto the stack. As a result, one can
produce unexpected results. For example, the expression \"5,3,grandma,+,*\"
would produce 15 because 5*(3+0) is how it would end up evaluated. That is,
5 would be pushed onto the stack, then 3, then \"grandma\". Next, + is
evaluated, so 3+\"grandma\" is evaluated. Perl evaluates \"grandma\" to be
numerically 0, so 3 is pushed back onto the stack. Next, the * multiplies
the top two items of the stack [5][3], producing 15, which is pushed back
onto the stack.

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

Content of RPM  Provides Requires

Download
ftp.icm.edu.pl  perl-Math-RPN-1.11-7.10.noarch.rpm
     

Provides :
perl(Math::RPN)
perl-Math-RPN

Requires :
perl(:MODULE_COMPAT_5.24.1)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


Content of RPM :
/usr/lib/perl5/vendor_perl/5.24.1/Math
/usr/lib/perl5/vendor_perl/5.24.1/Math/RPN.pm
/usr/lib/perl5/vendor_perl/5.24.1/x86_64-linux-thread-multi
/usr/share/doc/packages/perl-Math-RPN
/usr/share/doc/packages/perl-Math-RPN/Changes
/usr/share/doc/packages/perl-Math-RPN/README
/usr/share/man/man3/Math::RPN.3pm.gz

 
ICM