lanyou1900 / simplecalc Goto Github PK
View Code? Open in Web Editor NEWA very simple Java text calculator
A very simple Java text calculator
This is my Simple Calculator. A silly and simple project to learn Java coding and Github usage. The calculator was initially an integer calculator, but changed using the BigDecimal-class. So now it also handles floats, doubles, etc. Usage: "java SimpleCalc [math expression] (precision)" - [math expression] is the mathematical expression such as "98*4+2.2" - (precision) is the number of digits you would like to get in the final result. Default is 10. All precision during the calculations are done with precision*100. Only the last result is rounded to the value of precision. Changelog: Version 1.11: - bugfixes: 2/-2 and 2*-2 now work as they should. - error handling. - as usual: big code cleanup. Version 1.10: - completely new parser - new usage: "java SimpleCalc [math expression] (precision)" - [math expression] is the mathematical expression such as "98*4+2.2" - (precision) is the number of digits you would like to get in the final result. Default is 10. All precision during the calculations is precision*100. Only the last result is rounded to the value of precision. - one bug persists: you can't use "/-" in the calculation, for example "2/-2" will crash. Use "-2/2" instead. I will fix it ASAP. - another limitation: no parenthesises are allowed yet, nor are sinus, pi, etc... - and last but not least: I need to fix the error handling of the code. Version 1.03: - usage: "java SimpleCalc number1 (+-*/) number2." - better source code - simplified by Daniel - same functionality Version 1.02: - usage: "java SimpleCalc number1 (+-*/) number2." - fixed basic bug (crashed when no args was used) - better error handling when numbers are invalid. Version 1.01: - new usage: "java SimpleCalc number1 (+-*/) number2. You might have to use \* instead of *. - new structure in the code. Version 1.00: - added this file - README.txt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.