50 digits precision handheld calculator is it achievable or not?
01-20-2014, 07:31 PM
Post: #21
 Gjermund Skailand Member Posts: 78 Joined: Dec 2013
RE: 50 digits precision handheld calculator is it achievable or not?
Hi
I wrote the longfloat Library years ago.
I have a (alpha) version in hpgcc3 R002 based on the decnumber library.
This has complex math of standard functions including (inverse) trigometric and hyperbolic functions.
It is *much* faster, but require that you install an upgraded rom in order to run hpgcc3. There is no support for intervall arithmetic. There is no support for automatic function evaluation.
There are issues with rounding of results which I didn't manage to solve. Thus to make a finished product it requires help from one who is proficient in hpgcc3 and decnumber... and there are not many such people around.

Best regards
Gjermund Skailand
01-26-2014, 06:14 AM
Post: #22
 jwm Junior Member Posts: 17 Joined: Dec 2013
RE: 50 digits precision handheld calculator is it achievable or not?
(01-17-2014 10:53 AM)Jean-Marc Wrote:  This is a hypothetical question. Can a 50 digits precision handheld calculator be achievable with today's technology? I am not a programmer. I was just curious to know the numerous hurdles to accomplish such a task.

This is an open discussion. Software requirement and hardware that would be the size of a mobile phone. My interest is pure entertainment. This was sparked by my new found interest in homebrew calculators and the complexity of the technology.

I think that the hp42s has 25 digits internal precision. Please correct me if I am wrong and the hp 50g is 15 digits.

It would be quite straightforward, There are readily available free optimized arbitrary precision libraries out there, and it wouldn't be much work to port them to the modern ARM CPUs used in calculators.

http://en.wikipedia.org/wiki/Arbitrary-p...arithmetic

GMP is the most common one and would optimize very well on ARM, multiprecision arithmetic is common enough CPUs have instructions that lend themselves to it.

https://gmplib.org/

In fact, every unix (or derivative such as linux) system comes with an RPN arbitrary precision calculator called 'dc' originally written in 1965! It is quite likely one of the oldest computer programs still used regularly basically unchanged from when it was introduced (other than porting it to newer machines, and languages, it predates the C language even).

; echo "2 222 ^ p" | dc
6739986666787659948666753771754907668409286105635143120275902562304

(^ is exponent, p means print the top of the stack)

John
01-26-2014, 10:11 AM
Post: #23
 Paul Dale Senior Member Posts: 1,837 Joined: Dec 2013
RE: 50 digits precision handheld calculator is it achievable or not?
Most arbitrary precision libraries work in base two which isn't overly suitable for a calculator. dc (and its companion bc), work in decimal I believe.

- Pauli
 « Next Oldest | Next Newest »

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