Calculator++, Now Available for download on SourceForge!

Status
Not open for further replies.
I'm not sure what kmote is referring to, perhaps he feels you should use a Long Double.

He's talking about C++ and many other languages using the CPU to do decimal calculations. The CPU never returns an exact value when dividing, multiplying etc. There really isn't a true way around it in C++. However, in other languages built from C++ such as Python and PHP, they have data types that support exact calculations. In Python check out the "decimal.decimal" type.

Yeah, basically this.

What do you suggest I use?

Honestly, you can stick with doubles for the time being, it's probably not worth too much of your time at such an early stage of development, you just need to be aware that sometimes your calculations will come out rounded in strange ways (I'm told there's an IEEE spec describing it). I'm not a C++ guy but if you really want to look for something, you could search for something like "C++ precision math library".
 
UPDATE:
Added Sine, Cosine, and Tangent Ratio functions.

P.S. I'm about to tackle functions using Pi, but I'm not sure how to approach it, suggestions anyone.
 
Update:
Added functions for circumference, and area of a circle, Pondering what i should do next, Suggestions anyone?
I would also like to thank everyone for all their help so far, so Thanks.
,eXtensible
 
Hi Everyone,
So, so far I have 23 Functions:
  • Volume of Triangular Prisms
  • Round Down
  • Round Up
  • Cube Roots
  • Add
  • Subtract
  • Multiply
  • Divide
  • Square Root
  • Exponents
  • Pythagorean Theorum
  • Sine
  • Cosine
  • Tangent
  • Circumference
  • Area Of Circles
  • Logarithms
  • Area of Squares
  • Area of Triangles
  • Perimeter of Squares
  • Absolute Value
  • Volume of Cubes, Rectangular Prisms
  • Volume of Cylinders
I'm Currently still trying To add to this list so any suggestions would be appreciated.
Thanks For the Help,
eXtensible
 
How about making your calculator a little more user friendly? What if someone wants to make a series of calculations and doesn't want to exit/restart the calculator each time?
 
Sounds Like a good idea, I've been working on a function that will loop the selected function as many times as the user wants to. but I ran into a few problems, i figure i'll add a few more functions and algorithms and then i'll get to looping functions and possibly, combining functions to make advanced Calculations.
eXtensible
 
Having Problems: So i've started on allowing users to loop functions but I'm not sure how to do it since there's no built in loop function in C++. Any Help is Appreciated.
Thanks in Advance,
eXtensible
 
Don't know what you mean by no built-in loop function. There are while and for which both loop continuously until you tell them to stop.
 
Don't know what you mean by no built-in loop function. There are while and for which both loop continuously until you tell them to stop.

Oh, I didn't know that, I've been programming in C++ for a while but the need to loop functions had never arose, I'm using a goto loop to loop the functions. This should work.

Thanks,
eXtensible
 
Status
Not open for further replies.
Back
Top Bottom