Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

ttofis/simple-math

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-math

I was bored, so I made some simple math parser and calculator.

  • Arbitrary-length ("big") numbers. (Thanks to library "num")
  • Binary/Octal/Hexadecimal numbers
  • Bitwise operators
  • Factorial
  • Function system
  • Negative numbers
  • Non-whole numbers. (Thanks to library "bigdecimal-rs")
  • Orders of operations
  • Actually implement some functions

EDIT: Ugh, I can't even make a single project without @tbodt knowing a better solution :P
This time he told me about recursive parsers :O
So yeah, huge thanks to him for being such an awesome person!

simple-math vs GNU bc

After a lot of development, this actually turned out to be a pretty cool project.
Let's compare it to GNU bc!

simple-math cons:

  • New technology. Therefor it's currently less stable.
  • Power using pow(x, y), not x^y. This is due to the ^ operator doing something else.
  • bc is more powerful.
  • Probably some more things I don't know about.

simple-math pros:

  • Supports factorial built-in.
  • No need to struggle with scale=.
  • Auto-inserts times where needed (e.g. 2(2 + 2) is 8).
  • Supports bitwise operators and bitshifting.

About

Simple math parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%