Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.048.554 Times

Math::RPN 1.08

  Date Added: January 13, 2010  |  Visits: 624

Math::RPN

Report Broken Link
Printer Friendly Version


Product Homepage
Download (72 downloads)

RPN is a Perl extension for Reverse Polish Math Expression Evaluation. SYNOPSIS use Math::RPN; $value=rpn(expr...); @array=rpn(expr...); expr... is one or more scalars or lists of scalars which contain RPN expressions. An RPN expression is a series of numbers and/or operators separated by commas. (commas are only required within scalars). 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..

Requirements: No special requirements
Platforms: Linux
Keyword: Expression Libraries Math Expression Mathrpn Operators Polish Programming Pushed Reverse Reverse Polish Reverse Polish Math Expression Evaluation Rpn Stack
Users rating: 0/10

License: Freeware Size: 8.19 KB
MATH::RPN RELATED
Code Management Tools  -  2E Programming Language 0.8.2
2E Programming Language (two es, as in ee, or expression evaluator) is a simple algebraic syntax language. It natively supports expressions (composed of operators and operands), and function definitions, and basically nothing else. Therefore, it...
31.74 KB  
Productivity  -  Spirit Calculator 1.0.0.0
Spirit calculator is a simple calculator built with Boost Spirit library. Spirit is a set of C++ libraries for parsing and output generation implemented as Domain Specific Embedded Languages (DSEL) using Expression templates and Template...
1024 KB  
Programming  -  cbear 1.0.0.172
The 'cbear' framework is a set of libraries and common utilities for different programming languages and platforms.
675.81 KB  
Education  -  exp_evaluator_for_win_phone 1.0.0.0
it evaluates expression with each value of single digit. Each operation should be enclosed inside the braces. It uses the stack implementation of evaluation of infix. Requirements: Windows Phone 8.1, Windows Phone 8, Windows Phone 7.5
1024 KB  
Programming  -  Polish Flexion Engine 1.0
Polish Flexion Engine provides ready-to-use polish flexion dictionary with flexion engine for full flexion text search easily integrated in portals, web search,database searching engines. First aim is polish flexion (pl. polska fleksja).Demo on...
226.33 KB  
Games  -  Human Calculator - The best math game 1.1
? Free today!! Download it now!! The most challenging math game ever!! ? Maximise your calculation speed!! Human Calculator is the best math game that challenges your maximum calculation speed!! Game features: ? iPhone 5...
45.5 MB  
Education  -  Puzzles & Math Game for Kids and Preschoolers FREE 1.0.2
Are you searching a fun way for your kids to practice basic math ? This is the app for you! A wonderful, cute collection of math puzzles for toddlers and kids. Math puzzles for kids and preschoolers is an educational and entertaining...
38.6 MB  
Games  -  Quiz Dungeon (Math Edition) FREE 1.9
The best math game on the ipad and iphone! A new math RPG which allows you to defeat knights and slimes with your math skills. Open treasure boxes to win gold and buy weapons and armor to give you more power and defense from your enemies....
8.2 MB  
Education  -  Free Math Quiz 1.1.0.0
Whether you are learning math, want to brush up your knowledge, help your kids or just enjoy math quizzes, this fun application is right for you. Learning and practising math is always more fun when it's part of a game. This application...
1024 KB  
Education  -  Math Pack Flash Cards 1.1.0.0
Math Pack is the complete math refresher for kindergarten to 9th grade students where kids can practice math flash cards in a challenging way. This pack contains virtual flash cards for Addition, Subtraction Multiplication,...
1024 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB