AnthonyH93 / HexaCalc

Three tabbed calculator for decimal, hexadecimal and binary for iOS built in Swift with Xcode. Provides numerous operations and seamless conversion between the three tabs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Decimal mode - multiple operations are not calculated in typical order of operations

wesinator opened this issue · comments

commented

Hi Anthony,

The decimal mode of this calculator does not follow typical order of operations when using compounding operations.

To reproduce:
Compare the following steps between HexaCalc and the iOS calculator (or other system calc such as Windows calculator):

  • 60 - 0.1 * 60
    or
  • 60 - 60 * 0.1

it seems the calculator ends the calculation at each state after a second input.
this means it isn't really suitable as a general purpose decimal calculator, which is a drawback especially on iPad, which still doesn't have a native iOS calculator.

Happy holidays,

Hello Wes,

Sorry for the late response to this! I completely missed this post.

You are for sure right, the calculator is only designed to compute a calculation of two inputs, so when you click a second operation before pressing equals, it will compute the result of the first calculation, such as (60 - 0.1 = 59.9 * 60 = 3954).

This is something that I want to address by adding bracket operators or some kind of scientific mode that will allow you to enter calculations of any size, such as (60 - (0.1 * 60)) = (60 - 6) = 54. This will let you enforce the order of operations that you expect.

I will work on this new feature when I get some time, but it is high on the list of things I want to add to the calculator!

Thanks for the request! I will let you know once I add it