SpeedCrunch

Rating: 
4.875
Your rating: None Average: 4.9 (8 votes)

Sailfish port of SpeedCrunch calculator.

Based on the original port by @qwazix. Updated to the latest SpeenCrunch engine and fixed UI for Sailfish X. Currently tested in Jolla 1 and Sony Xperia.

New five row keyboard is quite cramped in Jolla 1. Standard Sailfish buttons seem to have fixed height regardless of screen size. Separate button class may be needed in future.

Source code available in Github.

Usage

User interface consists three pages and two keyboard panes. Leftmost page has function list, central page is the calculator itself and rightmost page contains some settings. Sideways swiping on the upper side of screen switches between pages and swiping on the keyboard switches either between pages or between keyboard panes.

Function and settings pages

Leftmost page has function list containing all SpeedCrunch engine functions, constants and units. Topmost field can be used to filter names. Pointing function name inserts it to the expression editing field and activates the main calculator page.

Rightmost page contains some settings. These are same as desktop version settings and mostly self-explanatory.

Expression editing and history list

At the top of the main calculator page is history list. All calculated expressions and their results are stored there. Pointing history list line inserts result to the expression editing. Pointing and holding history line recalls the whole expression for editing.

Below the history list is expression editing field. It can be edited either by calculator key panes or standard Sailfish virtual keyboard. Because the expression field is always active, it must be pointed twice to activate the Sailfish keyboard.

Below the expression editor is label field used for function syntax hints and autocalc results.

Keyboard and pulley menu

Most keys are familiar to anyone ever used handheld calculator. Key 0x is for entering hexadecimal values (0xFF). Key x is for variable name x and key X= is for user variable or function definition (x=42). Big arrow on the right side of second pane is for unit conversion (1 inch -> foot). Bottom row arrow keys and backspace are for expression field editing.

Some keys have secondary function available with long press:

  • Keys 1-6 produce hexadecimal values A-F
  • Key 9 produces j for complex number imaginary part
  • Key 0x produces 0b for binary values (0b1010)
  • Key x produces character y for another variable name
  • Key X= produces (x)= for function definition (foo(x)=)
  • Keys ← and → move cursor to start or end of expression

Bottom pulley menu has functions for copying latest result or expression to clipboard, pasting clipboard contents to the expression field and clearing the history list.

For more information, see desktop SpeedCrunch documentation.

 

Screenshots: 

Keywords:

Changelog: 

0.2.5 (2018-03-22)

  • Fixed ui scaling for Sailfish X
  • Updated engine to version 0.12
  • Added setting for decimals
  • Improved expression editing

0.2.6 (2018-03-25)

  • - Fixed cover expression
  • - Fixed inverse trigonometric functions
  • - Added units to function list
  • - Added setting for result format
  • - New keyboard:
    •     - Added fifth row for parenthesis and editing
    •     - Added semicolon for function parameters
    •     - Added button 0x for entering hexadecimal values
    •     - Button 0x produces 0b with long press
    •     - Buttons 1-6 produce letters A-F with long press
    •     - Hexadecimal result mode displays letters A-F
    •     - Added buttons for AND, OR and SHIFT operations
    •     - Long press with x= creates new function
    •     - Added new button -> for unit conversion
    •     - Removed home and end buttons
    •     - Removed deprecated % button

0.2.7 (2018-03-28)

  • Fixed angle unit setting z-ordering
  • Changed some keys to use Unicode characters
  • Added bottom pulley menu:
    • Copy result copies just result value to clipboard
    • Copy expression copies whole result line to clipboard
    • Paste gets clipboard contents to cursor position
    • Clear history clears whole history list
  • Added clear button for function search field
  • Added status texts for result format and angle unit
  • Changed GitHub repository name to speedcrunch-sailfish

0.3.0 (2018-04-11)

  • Added function parameter hints as text field label
  • Added autocalc value as text field label
  • Some minor keyboard tweaks:
    • Long press with x generates character y
    • Long press with ← goes to the start of expression
    • Long press with → goes to the end of expression
  • Submitted to Jolla Store

0.3.1 (2018-04-13)

  • Added support for complex numbers:
    • Setting for Disabled, Cartesian or Polar mode
    • Long press with 9 generates j for imaginary part
  • Changed automatic precision maximum decimals to 12
  • Added 16 and 20 decimals to the precision list
  • Reordered settings, moved format and precision to top
  • Fixed application initialization for Jolla Harbour QA
  • Resubmitted to Jolla Store

Comments

syrja's picture

Jolla Harbour QA revealed that the incorrect application initialization order in main() function resulted creation of directory mdeclarativecache_pre_initialized_qapplication-XXXX under ~/.config. XXXX being some random number.

This is now fixed in version 0.3.1, but you all probably have several unnecessary directories in your ~/.config. These can be deleted.

Sorry for the inconvenience.

 

geher's picture

Complex numbers are not working.
Supposed to be with engine version 0.12

syrja's picture

Yes, I know. Complex numbers are turned off by default in the engine. It just needs setting to turn them on. I'll add it to the next version.

ZaytsevArtem's picture

First of all: thanks for the great calculator. It's the best I ever met.

My question is: How could I type the time format units? I can type «3.2 minute» where «2» is read not as 2 seconds but as 12 seconds (of course it's correct as we use decimal format). i.e. the result is 192 seconds but not 182. «5:2» doesn't work atm. «3 minute + 2 second» does work but is there any more simple (i.e. laconical) way?

PS: The version is 0.12.

ZaytsevArtem's picture

And btw the result time format would be appreciated. I mean when I type «9141 second» it could show me something like «2:32:21» or «152:21» or «2 hour 32 minute 21 second» or «152 minute 21 second». I know i can type «9141 second in minute» but there's decimal «152,35» again.

syrja's picture

Current SpeedCrunch engine does not support time formats. Github issue #189 has some discussion about it, but nothing concrete yet.

As a land surveyor, I can understand the request. I myself need often degrees, minutes and seconds. So, I may investigate the problem.

ZaytsevArtem's picture

Okay, thanks for the reply and for the issue link. Let's hope the problems may have been overcome.

glv1092's picture

Unable to set Angle Unit to Degree in aquafish

syrja's picture

Seems to be bug in control Z-ordering. I'll fix it.

Meanwhile, click the Radian line and drag upwards to select degrees.

olf's picture

In lack of aforementioned issues section on Github, posting two issues here (tested with Speedcrunch mobile 0.2.6-1):

  1. [Usability issue] The term "Result format" in Speedcrunch's settings is somewhat misleading, as this setting heavily influences the input of numbers (e.g. the keyboard layout), too.
    Thus I suggest changing "Result format" to "Mode" (as on most calculators) or "Numeric mode".
  2. [Feature suggestion] Support of landscape orientation
    If one enforces landscape orientation (e.g. with uirotate-free or sailfishos-patch-freerotate-phone), currently the screen layout of Speedcrunch in landscape orientation does not fit at all.
syrja's picture

The term "Result format" comes from the original desktop version of SpeedCrunch and it does not change number input. Hexadecimal mode makes letters A-F visible in buttons 1-6, but does not chage the behavior of buttons. Normal press always produces number and long press produces letter, visible or not. Also, prefix (0b, 0o, 0x) is always needed for binary, octal and hexadecimal numbers regardless of mode.

Landscape mode would need substantial chages for UI and I try to keep it as close as possible to the desktop version. So, not a top priority feature.

olf's picture

Thanks for the information on the direction of your developments and the details of usage.

olf's picture

Thanks @syrja for updating and fixing Speedcrunch mobile.
Unfortunately, on Speedcrunch's Github repository the "Issues" tab seems to be deactivated, but its Wiki is active (although empty). Please fix that, so one can submit issues.

syrja's picture

Issues now activated.

Caballlero's picture

Awesome calculator, thx

Vieno's picture

Thanks for keeping this app alive. A fine calculator which was needed.