Skip to content

flaith-nycd/calc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

calc

Simple calculator made in RUST (with float values)

After seing the calc made in Python by GaryExplains and the Shunting-yard example : https://github.com/garyexplains/examples/tree/master/shunting-yard

I made a Rust one :)

$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target\debug\calc.exe`
Enter infix expression (ex: -->3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3<--)
3 + 4 * 2 / ( 1 - 5 ) ^ 2 ^ 3
TOKENS: ["3", "+", "4", "*", "2", "/", "(", "1", "-", "5", ")", "^", "2", "^", "3"]
Postfix expression: 3 4 2 * 1 5 - 2 ^ 3 ^ / +
Result: 3.001953125

About

Simple calc with RPN (NPI)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages