Author 
Message 
alpertron@hotmail.com science forum beginner
Joined: 04 Jul 2006
Posts: 6

Posted: Tue Jul 04, 2006 9:26 pm Post subject:
New high precision scientific calculator



Hello folks,
I've written a scientific calculator in Java. This highprecision
calculator features complex numbers, precision up to 1 million digits
and exponents up to 1 billion. For multiplications, the Karatsuba
method is used, so it is not fast at extremely high precision.
Default precision is 500 digits.
You can see the applet at: http://www.alpertron.com.ar/BIGCALC.HTM
The calculator is still in alpha stage. The "solve" and "chi^2" buttons
still do not work. Please let me know the errors you find so I can
correct it.
I also plan to add an "integer mode" where the calculator will solve
simple number theoretic problems.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM 

Back to top 


mensanator@aol.compost science forum Guru
Joined: 24 Mar 2005
Posts: 826

Posted: Tue Jul 04, 2006 9:31 pm Post subject:
Re: New high precision scientific calculator



alpert...@hotmail.com wrote:
Quote:  Hello folks,
I've written a scientific calculator in Java. This highprecision
calculator features complex numbers, precision up to 1 million digits
and exponents up to 1 billion. For multiplications, the Karatsuba
method is used, so it is not fast at extremely high precision.
Default precision is 500 digits.
You can see the applet at: http://www.alpertron.com.ar/BIGCALC.HTM
The calculator is still in alpha stage. The "solve" and "chi^2" buttons
still do not work. Please let me know the errors you find so I can
correct it.

It doesn't work, just displays a grey box,
Quote: 
I also plan to add an "integer mode" where the calculator will solve
simple number theoretic problems.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM 


Back to top 


alpertron@hotmail.com science forum beginner
Joined: 04 Jul 2006
Posts: 6

Posted: Tue Jul 04, 2006 9:37 pm Post subject:
Re: New high precision scientific calculator



Do you have the latest Java plugin installed? If not you will not be
able to see the applet.
You can download the Java plugin from http://www.java.com
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM
mensanator@aol.compost wrote:
[...]
Quote:  It doesn't work, just displays a grey box,
[...] 


Back to top 


Hugo Pfoertner science forum addict
Joined: 02 May 2005
Posts: 51

Posted: Tue Jul 04, 2006 10:42 pm Post subject:
Re: New high precision scientific calculator



alpertron@hotmail.com wrote:
You don't need the full Java distribution, just the run time
environment. On my old Win98 computer with
Java Plugin 1.5.0_06
Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM
the applet starts and shows some plausible results.
Hugo 

Back to top 


mensanator@aol.compost science forum Guru
Joined: 24 Mar 2005
Posts: 826

Posted: Wed Jul 05, 2006 1:08 am Post subject:
Re: New high precision scientific calculator



alpertron@hotmail.com wrote:
Quote:  Do you have the latest Java plugin installed? If not you will not be
able to see the applet.
You can download the Java plugin from http://www.java.com

Ok, that worked. You might want to add a note to that effect
on the web page.


Back to top 


Jeremy Boden science forum Guru Wannabe
Joined: 28 Apr 2005
Posts: 144

Posted: Wed Jul 05, 2006 1:34 am Post subject:
Re: New high precision scientific calculator



On Tue, 20060704 at 18:08 0700, mensanator@aol.compost wrote:
Quote:  alpertron@hotmail.com wrote:
Do you have the latest Java plugin installed? If not you will not be
able to see the applet.
You can download the Java plugin from http://www.java.com
Ok, that worked. You might want to add a note to that effect
on the web page.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM
mensanator@aol.compost wrote:
[...]
It doesn't work, just displays a grey box,
[...]
It partially works [on Linux]  however when I tried to get it to fill 
in the value of Pi to the claimed million digits, it sent my javavm
into a loop which claimed to be using 55MB of my main memory.
So I had to kill the process.

Jeremy Boden 

Back to top 


alpertron@hotmail.com science forum beginner
Joined: 04 Jul 2006
Posts: 6

Posted: Wed Jul 05, 2006 1:47 am Post subject:
Re: New high precision scientific calculator



Jeremy Boden wrote:
Quote:  On Tue, 20060704 at 18:08 0700, mensanator@aol.compost wrote:
alpertron@hotmail.com wrote:
Do you have the latest Java plugin installed? If not you will not be
able to see the applet.
You can download the Java plugin from http://www.java.com
Ok, that worked. You might want to add a note to that effect
on the web page.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM
mensanator@aol.compost wrote:
[...]
It doesn't work, just displays a grey box,
[...]
It partially works [on Linux]  however when I tried to get it to fill
in the value of Pi to the claimed million digits, it sent my javavm
into a loop which claimed to be using 55MB of my main memory.
So I had to kill the process.

Jeremy Boden

Jeremy,
One million digits is a lot for computing transcendental functions. I
suggest you to first compute pi with 10000 digits, then with 50000
digits, so you can extrapolate the time needed for one million digits.
Please notice that Java claims memory to the operating system, but then
it does not release it. I'm sure my code does not need 55 MB in order
to compute pi to the requested precision.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM 

Back to top 


Jeremy Boden science forum Guru Wannabe
Joined: 28 Apr 2005
Posts: 144

Posted: Wed Jul 05, 2006 11:57 am Post subject:
Re: New high precision scientific calculator



On Tue, 20060704 at 18:47 0700, alpertron@hotmail.com wrote:
Quote:  Jeremy Boden wrote:
On Tue, 20060704 at 18:08 0700, mensanator@aol.compost wrote:
alpertron@hotmail.com wrote:
Do you have the latest Java plugin installed? If not you will not be
able to see the applet.
You can download the Java plugin from http://www.java.com
Ok, that worked. You might want to add a note to that effect
on the web page.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM
mensanator@aol.compost wrote:
[...]
It doesn't work, just displays a grey box,
[...]
It partially works [on Linux]  however when I tried to get it to fill
in the value of Pi to the claimed million digits, it sent my javavm
into a loop which claimed to be using 55MB of my main memory.
So I had to kill the process.

Jeremy Boden
Jeremy,
One million digits is a lot for computing transcendental functions. I
suggest you to first compute pi with 10000 digits, then with 50000
digits, so you can extrapolate the time needed for one million digits.
Please notice that Java claims memory to the operating system, but then
it does not release it. I'm sure my code does not need 55 MB in order
to compute pi to the requested precision.
Point taken  but since it is provided as a constant I expected a 
precalculated value to be provided. Computing Pi to 1,000,000 places
(with java) on my ancient 600Mhz PC is definitely a nontrivial
exercise!
I suspect that you provide Pi precalculated for 500 digits as there was
no noticable delay.

Jeremy Boden 

Back to top 


alpertron@hotmail.com science forum beginner
Joined: 04 Jul 2006
Posts: 6

Posted: Wed Jul 05, 2006 12:02 pm Post subject:
Re: New high precision scientific calculator



Jeremy Boden ha escrito:
Quote:  On Tue, 20060704 at 18:47 0700, alpertron@hotmail.com wrote:
Jeremy Boden wrote:
On Tue, 20060704 at 18:08 0700, mensanator@aol.compost wrote:
alpertron@hotmail.com wrote:
Do you have the latest Java plugin installed? If not you will not be
able to see the applet.
You can download the Java plugin from http://www.java.com
Ok, that worked. You might want to add a note to that effect
on the web page.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM
mensanator@aol.compost wrote:
[...]
It doesn't work, just displays a grey box,
[...]
It partially works [on Linux]  however when I tried to get it to fill
in the value of Pi to the claimed million digits, it sent my javavm
into a loop which claimed to be using 55MB of my main memory.
So I had to kill the process.

Jeremy Boden
Jeremy,
One million digits is a lot for computing transcendental functions. I
suggest you to first compute pi with 10000 digits, then with 50000
digits, so you can extrapolate the time needed for one million digits.
Please notice that Java claims memory to the operating system, but then
it does not release it. I'm sure my code does not need 55 MB in order
to compute pi to the requested precision.
Point taken  but since it is provided as a constant I expected a
precalculated value to be provided. Computing Pi to 1,000,000 places
(with java) on my ancient 600Mhz PC is definitely a nontrivial
exercise!
I suspect that you provide Pi precalculated for 500 digits as there was
no noticable delay.

Jeremy Boden

Jeremy,
There are no precomputed constants in the applet, since they would
increment download time. Remember that the applet runs on your
computer.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM 

Back to top 


Felix Rawlings science forum beginner
Joined: 19 May 2005
Posts: 48

Posted: Wed Jul 05, 2006 3:08 pm Post subject:
Re: New high precision scientific calculator



On Tue, 04 Jul 2006 14:26:50 0700, alpertron wrote:
Quote:  Hello folks,
I've written a scientific calculator in Java. This highprecision
calculator features complex numbers, precision up to 1 million digits and
exponents up to 1 billion. For multiplications, the Karatsuba method is
used, so it is not fast at extremely high precision.

I would have thought that the culprit is Java. Even if you used FFT
methods, it would probably still be slow. High performance arbitrary
precision libraries written in C (which results in code that runs much
faster than Java, JIT compiler regardless) usually have their core
integer vector multiplication code written in assembly language. This
makes an absolutely dramatic performance difference  modular
exponentiation functions, widely used in RSA cryptography, when
using such assembly language core routinely are one order of magnitude
faster than their all C counterparts. 

Back to top 


alpertron@hotmail.com science forum beginner
Joined: 04 Jul 2006
Posts: 6

Posted: Wed Jul 05, 2006 4:35 pm Post subject:
Re: New high precision scientific calculator



Felix Rawlings ha escrito:
Quote:  On Tue, 04 Jul 2006 14:26:50 0700, alpertron wrote:
Hello folks,
I've written a scientific calculator in Java. This highprecision
calculator features complex numbers, precision up to 1 million digits and
exponents up to 1 billion. For multiplications, the Karatsuba method is
used, so it is not fast at extremely high precision.
http://www.alpertron.com.ar/BIGCALC.HTM
I would have thought that the culprit is Java. Even if you used FFT
methods, it would probably still be slow. High performance arbitrary
precision libraries written in C (which results in code that runs much
faster than Java, JIT compiler regardless) usually have their core
integer vector multiplication code written in assembly language. This
makes an absolutely dramatic performance difference  modular
exponentiation functions, widely used in RSA cryptography, when
using such assembly language core routinely are one order of magnitude
faster than their all C counterparts.

Felix,
You are right, but unfortunately applets cannot be written in C.
In the other hand, since the calculator is interactive, we are not
interested in extremely fast results. For example, if a calculation is
done in less than about 0.2 sec the user will think that the applet
does it instantaneously.
The problem occur for transcendental functions when thousands of digits
are required. Since I used the AGM method, the number of
multiplications needed to compute them is related to the logarithm of
the number of digits, except for the Gamma or factorial functions for
noninteger arguments where the number of multiplications needed is
proportional to the number of digits, so they are very slow.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM 

Back to top 


Felix Rawlings science forum beginner
Joined: 19 May 2005
Posts: 48

Posted: Wed Jul 05, 2006 9:25 pm Post subject:
Re: New high precision scientific calculator



On Wed, 05 Jul 2006 09:35:42 0700, alpertron wrote:
Quote:  Felix Rawlings ha escrito:
On Tue, 04 Jul 2006 14:26:50 0700, alpertron wrote:
Hello folks,
I've written a scientific calculator in Java. This highprecision
calculator features complex numbers, precision up to 1 million digits
and exponents up to 1 billion. For multiplications, the Karatsuba
method is used, so it is not fast at extremely high precision.
http://www.alpertron.com.ar/BIGCALC.HTM
I would have thought that the culprit is Java. Even if you used FFT
methods, it would probably still be slow. High performance arbitrary
precision libraries written in C (which results in code that runs much
faster than Java, JIT compiler regardless) usually have their core
integer vector multiplication code written in assembly language. This
makes an absolutely dramatic performance difference  modular
exponentiation functions, widely used in RSA cryptography, when using
such assembly language core routinely are one order of magnitude faster
than their all C counterparts.
Felix,
You are right, but unfortunately applets cannot be written in C.
In the other hand, since the calculator is interactive, we are not
interested in extremely fast results. For example, if a calculation is
done in less than about 0.2 sec the user will think that the applet does
it instantaneously.
The problem occur for transcendental functions when thousands of digits
are required. Since I used the AGM method, the number of multiplications
needed to compute them is related to the logarithm of the number of
digits, except for the Gamma or factorial functions for noninteger
arguments where the number of multiplications needed is proportional to
the number of digits, so they are very slow.

Maybe you should consider limiting the precision? I mean, for an
interactive tool a billion digits is overkill, and probably so is a
million digits. If I wanted to compute something with a precision beyond,
say, 10^5 digits, I wouldn't use a Java applet anyway. 

Back to top 


Mike1161 science forum addict
Joined: 14 Oct 2005
Posts: 50

Posted: Wed Jul 05, 2006 11:31 pm Post subject:
Re: New high precision scientific calculator



In article <1152117342.237645.301510@75g2000cwc.googlegroups.com>, alpertron@hotmail.com says...
Quote:  Felix Rawlings ha escrito:
On Tue, 04 Jul 2006 14:26:50 0700, alpertron wrote:
Hello folks,
I've written a scientific calculator in Java. This highprecision
calculator features complex numbers, precision up to 1 million digits and
exponents up to 1 billion. For multiplications, the Karatsuba method is
used, so it is not fast at extremely high precision.
http://www.alpertron.com.ar/BIGCALC.HTM

Very nice.
One 'feature' that doesn't appear so nice is that if you change the no of digits then immediately do a memory recall,
the memory is recalled to the digits edit box. I would suggest that only direct keyboard input to the digits editbox
would be more narural behaviour (and that memory recall should only go into the main entry window). Another feature: If
you enter '12345' and hit backspace you get '1234'  all well and good. But if you enter 2, hit cos, move the cursor to
the end of the answer (i.e. with 100 digit precision you have "...948 067 5", where '' marks the cursor) and now
press backspace, the entire expression is deleted.
Just noticed that cut and paste from the result window doesnt work either.
But as I said, v. nice overall. 

Back to top 


alpertron@hotmail.com science forum beginner
Joined: 04 Jul 2006
Posts: 6

Posted: Thu Jul 06, 2006 1:30 am Post subject:
Re: New high precision scientific calculator



Felix Rawlings wrote:
Quote:  On Wed, 05 Jul 2006 09:35:42 0700, alpertron wrote:
Felix Rawlings ha escrito:
On Tue, 04 Jul 2006 14:26:50 0700, alpertron wrote:
Hello folks,
I've written a scientific calculator in Java. This highprecision
calculator features complex numbers, precision up to 1 million digits
and exponents up to 1 billion. For multiplications, the Karatsuba
method is used, so it is not fast at extremely high precision.
http://www.alpertron.com.ar/BIGCALC.HTM
I would have thought that the culprit is Java. Even if you used FFT
methods, it would probably still be slow. High performance arbitrary
precision libraries written in C (which results in code that runs much
faster than Java, JIT compiler regardless) usually have their core
integer vector multiplication code written in assembly language. This
makes an absolutely dramatic performance difference  modular
exponentiation functions, widely used in RSA cryptography, when using
such assembly language core routinely are one order of magnitude faster
than their all C counterparts.
Felix,
You are right, but unfortunately applets cannot be written in C.
In the other hand, since the calculator is interactive, we are not
interested in extremely fast results. For example, if a calculation is
done in less than about 0.2 sec the user will think that the applet does
it instantaneously.
The problem occur for transcendental functions when thousands of digits
are required. Since I used the AGM method, the number of multiplications
needed to compute them is related to the logarithm of the number of
digits, except for the Gamma or factorial functions for noninteger
arguments where the number of multiplications needed is proportional to
the number of digits, so they are very slow.
Maybe you should consider limiting the precision? I mean, for an
interactive tool a billion digits is overkill, and probably so is a
million digits. If I wanted to compute something with a precision beyond,
say, 10^5 digits, I wouldn't use a Java applet anyway.

Please notice that the precision is limited to 1 million digits. The
timing for the elementary operations (+, , *, /) should not take too
long. The problem is with the transcendental functions.
Anyway, what is missing on the applet is an indication of progress of
the current operation and a way to stop the computation in progress.
Best regards,
Dario Alejandro Alpern
Buenos Aires  Argentina
http://www.alpertron.com.ar/ENGLISH.HTM 

Back to top 


Google


Back to top 



The time now is Sun May 27, 2018 1:37 pm  All times are GMT

