Post Reply 
Ideas for Additional Calculator Features
12-11-2019, 02:43 PM
Post: #1
Ideas for Additional Calculator Features
Hi all!

Right now I'm working on a successor for my calculator ScArY.

I'm combining the cheap development board QYF-TM1638 (8 digit LED display, 16 buttons) with an Arduino/Genuino (USB/ATMEGA328, 28672 bytes of flash RAM) which gives me the opportunity for many more functions (see attachment). Even calculating matrices with complex numbers is implemented - not bad for a $5 DIY calculator.

Right now I still have approx. 5 kilobytes of free flash memory. I'm planning to implement some kind of program editor and additional programming features (GOTO, X?Y, GOSUB, ...) but maybe there are more valuable things to do with the spare memory.

Do you have any suggestions or wishes what I could implement else?

Regards
deetee


   

Features so far:
Code:

      - 0 1 2 3 4 5 6 7 8 9 . ... Digits and decimal point
      - CHS EE                ... Change sign and enter exponent (actually Y*10^X)
      - ENTER                 ... Enter number (push stack)
      - C CA                  ... Clear stack/sum-register or entry, escape/stop
      - f g DARK MENU         ... Function key (single/double/triple/long) press
      - DARK                  ... Deactivate display till next keypress
      - MENU                  ... Browse menu
      - + - * /               ... Basic operations      
      - SWAP LASTx            ... Swap X and Y register of stack and LASTx
      - ROTv ROT^             ... Rotate stack
      - STO RCL               ... Store or recall one number
      - MSTO MRCL             ... Store/recall up to 16 numbers to/from EEPROM permanently      
      - BRIGHT+ BRIGHT-       ... Adjust brightness of display (8 levels)
      - SUM+ SUM-             ... Enter X-data for statistics or X,Y-data for L.R.
      - CREC CPOL             ... Enter complex number (rectangular or polar)
      - CVIEW                 ... View/browse complex number (with cursor keys 0 and .)
      - CATALOG               ... Browse all functions (with cursor keys E +- 0 .)
      - USR                   ... CATALOG and set function key of user (custom) menu      
      - REC                   ... Record/program steps (16 slots a 55 steps)
      - PLAY                  ... Play/execute recorded programs
      - SOLVE INT             ... Find root or calculate integral of recorded function
      - SAVE LOAD             ... Send/load program to/from serial (USB) connection
      - WATCH                 ... Set/show clock (hours minutes seconds)      
      - SQRT POW INV PI       ... Basic Functions 
      - EXP LN POW10 LOG      ... More basic Functions
      - GAMMA nCr nPr         ... Gamma, combination and permutation
      - ANNU                  ... Present value of given interest rate and periods
      - GAUSS                 ... PDF (X) and CDF (Y) of standard normal distribution
      - STAT                  ... Mean value (X) and standard deviation (Y)
      - L.R.                  ... Line best fit (y = X * x + Y)
      - SIN COS TAN           ... Trigonometric Functions
      - ASIN ACOS ATAN        ... Inverse trigonometric Functions
      - SINH COSH TANH        ... Hyperbolic Functions
      - ASINH ACOSH ATANH     ... Inverse hyperbolic Functions
      - HMS2H H2HMS           ... Conversions
      - RAD2DEG DEG2RAD F2C C2F
      - IN2CM CM2IN MI2KM KM2MI
      - GAL2L L2GAL LBS2KG KG2LBS
      - MCLRA/B MSWAPA/B      ... Clear or swap matrices A or B
      - MSTOA/B MRCLA/B       ... Store or recall element of matrix A or B
      - MDETA                 ... Calculate detA
      - MINVA A*B A-B A+B     ... Invert matrix A or multiply/subtract/add A and B
Find all posts by this user
Quote this message in a reply
12-12-2019, 12:10 AM
Post: #2
RE: Ideas for Additional Calculator Features
A good natural-log-of-gamma function can be useful for solving problems with intermediate values that would otherwise soar past the numerical limits of the calculator.
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2019, 06:26 AM
Post: #3
RE: Ideas for Additional Calculator Features
(12-12-2019 12:10 AM)Dave Britten Wrote:  A good natural-log-of-gamma function

Dear Dave!

Thanks for your interesting suggestion.
Right now I'm approximating the gamma function with a formula from Mr. Nemes, which has the boundaries you describe. It "consumes" approximately 200 bytes of memory.

Do you have an recommendation how to calculate or approximate ln-gamma in an easy and codesize-friendly way?

Regards
deetee
Find all posts by this user
Quote this message in a reply
12-12-2019, 07:41 AM
Post: #4
RE: Ideas for Additional Calculator Features
I found some good formula from Mr. Nemes to calculate lnGAMMA:

lnGAMMA(x) = (ln(2*PI) - ln(x)) / 2 + x * (ln(x+1/(12*x-1/10/x)) - 1)

which works fine.

Thanks to Dave for your improvement.

Regards
deetee
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)