RE: [PEAR-DEV] Package Proposal: Math_RPN
| From: | LIMBOURG Arnaud | Date: | Mon, 26 May 2003 09:59:55 +0000 |
| Subject: | RE: [PEAR-DEV] Package Proposal: Math_RPN | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-16700@lists.php.net to get a copy of this message | ||
One thing, if i am not mistaken "pile" should be translated to "stack". Do
you pile in polish ? (we do in french :)
> Hi,
> I wrote a class that can make and calculate a RPN (reversed polish
> notation) expression.
> RPN is formal logic system which allowed mathematical
> expressions to be
> specified without parentheses by placing the operators before
> or after the
> operands.
> For example 2+5*7 in RPN looks 2,5,7,*,+
>
> You can take a look at the source code and example here:
> http://www.maciek.maribex.wizja.net.pl/rpn/
>
> Sample usage:
>
> $expression = '(3+2)*(7-sin(30)*log(10))';
>
> require_once 'Math/RPN.php';
>
> $rpn = new RPN(false);
>
> $value = $rpn->getValue($input); // 32.5
>
> Any questions, comments, or suggestions?
>
> Regards,
> Maciek Szczytowski
> admin@e-rower.pl
>