NAME

Math::RPN::Simple - Simpler implementation of Math::RPN.

VERSION

Version 1.1.0

DESCRIPTION

Math::RPN::Simple is used to convert infix and postfix notations and to evaluate them.

METHODS

to_infix(expression)

  • expression - Postfix expression to convert.

  • return value - Infix representation of expression.

to_postfix(expression)

  • expression - Infix expression to convert.

  • return value - Postfix representation of expression.

evaluate_infix(expression)

  • expression - Infix expression to evaluate.

  • return value - Value of infix expression.

evaluate_postfix(expression)

  • expression - Postfix expression to evaluate.

  • return value - Value of postfix expression.

OPERATORS

  • x+y - Sum of x and y.

  • x-y - Difference of x and y.

  • x*y - Product of x and y.

  • x/y - Quotient of x and y

  • x**y - x to the power of y.

FUNCTIONS

  • abs(x) - Returns absolute value of x.

  • int(x) - Returns int representation of x.

  • cos(x) - Returns cos of x.

    =item*

    sin(x) - Returns sin of x.

BUGS

Please report any bugs here:

AUTHOR

Michał Wróblewski <debos@cpan.org>

COPYRIGHT

Copyright (c) 2019 Michał Wróblewski

LICENSE

This project is licensed under the MIT License - see the LICENSE file for details.