Code Monkey home page Code Monkey logo

simplecalc's Introduction

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


simplecalc's People

Contributors

skovmand avatar

Watchers

James Cloos avatar Echo Lee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.