NEW BEST CALCULATOR ON REPL.IT
** NEW BEST CALCULATOR ON REPL.IT
title may or may not be stolen from @henryeth **
From thought to idea to working code, I present to you a great calculator. I have been coding in the dark for many days now, to shine it upon the light!
Here's a more complete (and slightly less biased lol) version with 3 being compared:
|Multiplication /w ||yes||yes||yes|
|Multiplication /w ||yes||no||no|
|Unary operators||yes||yes (but no use)||no|
|Multiplication by parenthesis||yes||no||no|
|Square roots (||yes||no||no|
|Use calculator more than 1 time per run||yes||yes||no|
|Built in generally fast language||yes||no||yes|
|Lots of colors!||yes||no||no|
|Fast startup times||yes||yes||no|
|Greater than or equal to||yes||no||no|
|Less than or equal to||yes||no||no|
|No floating point inaccuracies||yes (as I'm aware of)||no||yes|
|Exclude the ||yes||no||no|
Yes, you just saw error handling in my calculator's features
maybe solely because I don't want people abusing this calculator
I have everything the two other calculators have (as I currently know) and more!
Here are some great pics showing off the calculator's capabilities!
- Inspired to do this after @henryeth made a calculator (to expand knowledge)
- Made by converting the expression/equation to Reverse Polish Notation with the Shunting yard algorithm, which is then easily solved
- Any inaccuracies in this post that should be corrected please tell me
- I made a goal to not use any external dependencies other than those rust has itself, which meant lots of code.
- Please don't look at the code
it's ugly don't blame me for writing
432 lines of bad code distributed among 13 files I already know :(
No hate/spam/unconstructive criticism plez
I'm aware that this is an old post but...My post does not have floating point inaccuracies, and well...the slow startup time? BLAME REPLIT
EDIT: Mine also has decimals...-_-
Maybe you could change the run command to execute the binary instead of compiling it every single time (what I did).
Your post does not have floating point inaccuracies, and has decimals.
But there aren't any floating point inaccuracies because the number is truncated to the first 10 digits.
Expression 2 ^ 3 ^ 4 -> 4096
I thought that this would be parsed as (2 ^ (3 ^ 4)), therefore it would be (2 ^ 81) and then (2417851639229258349412352)?
Now allow me to to type in:
f(x) = x * x f(4) 16
YYYEEESSS I FOUND SMTH MINE DOES AND URS DOESN'T. Mine ignores illegal characters and urs raises errors for them I mean c'mon...
Thank you especially for pinging me twice in the description and mentioning me on my calculator and mispelling my name once in the description. I will get this title back do not worry hehe. Maybe in Python though, the "slow" programming language.
fml I make a post titled "Actual good calculator" and now there are like 2 more best calculator on replit wannabes. :'(