## What would be the ultimate calculator in 2017?

General discussion about calculators, Swiss Micros or otherwise
pauli
Posts: 52
Joined: Tue May 02, 2017 8:11 am
Location: Australia

### Re: What would be the ultimate calculator in 2017?

rprosperi wrote:
Mon Sep 11, 2017 12:53 am
Pauli - in rough terms, how much of the inner core (math foundations) of the 34s f/w is exercised in this test?
It depends on the definition of the core functions, but not a lot:
• Range reduction in degrees mode is just mod 360.
• All three Trigonometric operations are calculated using a single Taylor series function that does both sine and cosine simultaneously.
• All three inverse trigonometric functions are calculated using an arc tangent function, again using a Taylor expansion.
Thus, all four basic arithmetic operations, modulo and square root are exercised, little else is. Range reduction is more complex than this suggests and precision is increased temporarily at times but these don't mean any more code is executed.

The 34S functions occupy about a third of the firmware size, keyboard handling and display code will also be exercised by this sequence and they probably contribute more to the total than the mathematics do.

Pauli

Thomas Okken
Posts: 591
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

### Re: What would be the ultimate calculator in 2017?

dm319 wrote:
Mon Sep 11, 2017 7:39 am
Thomas Okken wrote:
Mon Sep 11, 2017 4:13 am
the trigs (in radians), logarithms, exponentials, hyperbolics, and gamma, are all handled by the Intel Decimal Floating-Point Math Library.
That's really interesting Thomas - I assume the basic operators are also handled by the library? Can you tell me why sqrt(-9) and (-9)^0.5 give different answers, though sqrt(9) and 9^0.5 give the same?
Yes, arithmetic and square root are also library functions.

The difference between sqrt(-9) and (-9)^0.5 is because complex Y^X does not recognize X = integer + 0.5 as a special case, instead performing the general complex power, where the result is not exact.

dm319
Posts: 31
Joined: Thu Aug 03, 2017 10:21 am

### Re: What would be the ultimate calculator in 2017?

Thomas Okken wrote:
Mon Sep 11, 2017 10:15 am
The difference between sqrt(-9) and (-9)^0.5 is because complex Y^X does not recognize X = integer + 0.5 as a special case, instead performing the general complex power, where the result is not exact.
Thanks for the explanation Thomas. It doesn't stop amazing me the amount of work that has gone into free42.

The more I read about the numworks, the less enthused I am about it. The license is quite strange - I imagine fairly off-putting for a potential community, and using binary seems like a bit of a mistake. (0.3-0.2)-0.1 = 2.78e-17. Admittedly not that inaccurate - just off-putting. Not to mention the lack of RPN and very early python support... quite far away from my ultimate calculator!

It had me thinking (a dangerous thing). The Go compiler allows for fairly easy cross-compiling. But how far away is that from allowing a compiled binary to run on the DM42? It supports android-arm, darwin-arm, freebsd-arm, linux-arm, linux-arm64, netbsd-arm & openbsd-arm. I guess the DM42 allows for a compiled binary to run on it's hardware - i.e. free42. It'd be great if it were able to call another one - can anyone tell me how possible/impossible this is? In fact it goes back to Vitasam's second point at the beginning of the thread:
Vitasam wrote:
Mon Aug 07, 2017 6:34 pm
To summarize: DM42 is very close to be my ideal calculator but few things are still floating in my wish-list:
- Graphics primitives RPN commands (keystrokes) with an access to a whole 400x240 screen.
- New type of binary-to-RPN API, where one can use STM32 Asm or C cross-compiler on a PC to build a binary which user can put to the file system and run directly from RPN program, as native ARM-executables.
- LED backlight?