[Watch app] Formula Calculator

moridhmoridh Posts: 8Member Pebbler
edited June 2013 in Pebble Watchapp Directory
Not actually a formula calculator, but you can input your calculations that looks like a formula.
Input using text a la Tertiary Text.

image

Control

- input using up and select buttons

- hold select button to cancel current text selection

- down button to enter edit mode

- hold down button to clear formula


Edit mode

click <--: move cursor 1 step to the left

hold <<-: move cursor to the beginning


click del: delete preceding character (backspace in actuality)

hold -X-: exit edit mode


click -->: move cursor 1 step to the right

hold ->>: move cursor to the end


Formula

- operators execute first come first serve

- if you want to specify which to carry out first, use brackets

- brackets will only be processed if paired

- unpaired brackets are ignored and will not inflict error

- cannot have operators immediately after an open bracket (except -ve sign) e.g: (*3 - 3)


Input errors (vibrate)

- exceed limit of 7 digits (by inputting a number or deleting a symbol making 2 numbers converge becoming more than 7 digits)

- double decimal point in a single number

- double operator symbol


Notes
Kinda did this in a rush...
Not tested thoroughly yet so might be bugs here and there.
Do tell when you find one... :)

Post edited by whacko on
·

Comments

  • dersiedersie Posts: 1,085Member
    edited May 2013
    Interesting :)

    Shame to be limited to 8 application, not easy to test new and force to choose which clear :(

    (And no link for this app)
    Post edited by dersie on
    ·
  • moridhmoridh Posts: 8Member Pebbler
  • moridhmoridh Posts: 8Member Pebbler
    Did a bit of a facelift...
    image
    Update:
    - white symbols in black box indicate single click
    - black symbols in white box indicate long press
    - formula wraps without '-' sign that might be confused with 'minus' sign
    - limits formula to 80 character, 6 lines
    - can enter a new line ('n' symbol) in the formula to force wrap neatly
    - will display input error and formula warning (ignored warnings might result inaccurate calculations)

    Get the updates here at MyPebbleFaces
    ·
  • CodeistCodeist Posts: 4Member
    Maybe just me... but as a suggestion, I'd put an example equation that is correct on your screenshot.  1+2(3/4) = 2.5, not 2.25.  That alone has me very hesitant to even try the app.
    ·
  • moridhmoridh Posts: 8Member Pebbler
    actually that is the correct answer given how the app interprets the formula.
    like mentioned, it executes formula first come first serve basis unless bracketed.
    the example above:
    - 1st execute the bracket (3 / 4) = 0.75
    - then execute 1 + 2 = 3
    - then execute 3 * 0.75 = 2.25

    to get 2.5, the formula should be 1 + (2 (3 / 4))

    let me know if most people would prefer the multiplication using brackets to execute first, as we usually do in mathematics or physics calculations
    ·
  • DavidFishmanDavidFishman Posts: 60Member Pebbler
    Correct me if I'm wrong, but doesn't multiplication come before addition per order of operations? Shouldn't it be:

    1. (3/4)
    2. 2 * 0.75
    3. 1 + 1.5 = 2.5
    ·
  • moridhmoridh Posts: 8Member Pebbler
    that's right...
    that's why i made the effort to mention the 'first come first serve' thingie in the description.
    haven't got the opportunity to put in the algorithm to properly carry out the operations based on the divide-multiply-add-sub order.
    sorry for the inconvenience... :(
    ·
  • DavidFishmanDavidFishman Posts: 60Member Pebbler
    Gotcha, still totally love your app just useless for me without order of operations :(
    ·
  • MaartenKeetMaartenKeet Posts: 1Member
    I would like to see an SDK 2.0 version. I found the SDK 1.0 version very handy.
    ·
Sign In or Register to comment.