Skip to content

djbarrow/rpn_simplify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RPN Simplify

A simple RPN expression simplifier written in C.

Features

  • Constant folding for arithmetic and transcendental operations.
  • Algebraic identity simplifications.
  • Support for: +, -, *, /, pwr, sin, cos, tan, !, exp, ln.

Examples

  • x exp ln -> x
  • x ln exp -> x
  • x y pwr ln -> y x ln *
  • x exp y exp * -> x y + exp
  • x exp y pwr -> x y * exp
  • x 0 pwr -> 1
  • x 1 pwr -> x

Building

make

Usage

./rpn_simplify

Enter RPN expression at the prompt.

About

A routine to simplify an rpn expression

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors