Huge number calculations
Has any work been done that improves the java huge number work. I need to work with some really large computations but I also can't have any errors or rounding.
Thanks. |
Large data crunching in java ?
LOL think CUDA why java ? i do a lot with multi GIG data sets and would never think of using java c++, FORTRAN, Perl, or cuda yes but not java |
Yes, why java? What about BigDecimal?
|
I may have led you astray. I really need any method that would work in a modern x86-64 since that is my target device right now.
All I found was a biginteger set of java for this task that had exact results. I never thought about using cuda or video card to do number calculations. I'll have to study on that since I know nothing about cuda. There are some web pages that can do huge calculations like 30000 raised to 30000 for example but they fail at some point as the numbers get close to what I am working on. Or example maybe simple like 3 raised to 3 raised to 3. Thanks for the ideas. I have not worked with python or ruby at all either so it will be an uphill battle. |
CUDA is a pain in the bleep , so unless you can program in it ,it might not be a great choice
There is Perl and a mess of perl mods for math and calculations Quote:
|
Or you could install the genius package (and the needed libraries). Then use the GEL script to program your computation to whatever degree of precision you want. For example:
Code:
$ printf "FloatPrecision=1000;sum n=1 to 500 do 1/n\n" | genius |
you can do your other work with java & each time you need to calculate the huge Number,,use power of ShellScript from java(connect from java to OS consol),,
and save the huge number in the string,, |
Again thanks for the ideas and I appreciate any ideas. This is now simply a hobby sort of quest.
I had considered a purpose designed chip even but the end product would have to be an add on card for the task. I have been looking at crypto tech on this also and did study up on cuda. It may be possible but as you say, a lot going on for a newbie to program. "Note that it is impossible to get an exact, non integer, result for a computation on a digital computer" This is my problem. I can't have any guesses and other built in cheats that have been wrongly added into the entire math portion of x86. It needs to be precise. It is a true integer but in a very great length. I am only working with whole real numbers. At some point in the calculation, I need to end up with this huge number. reza_zah1991, thanks for the idea, doing that over a network is what I am trying to avoid actually. Yes, a different system could do this. |
Quote:
Unless you are thinking of symbolic manipulation of real numbers? That can also be done on a digital computer. Quote:
|
Quote:
It is also obvious that the set of integers that can be used by any (finite) digital computer is finite. The size of those sets can be made quite large, but never infinite. |
Quote:
The nice thing about rational numbers is that they're a commutative ring, and by definition they all have a fractional representation, so arithmetic doesn't cause the representation of the result to be more complicated than the operands. I believe numbers of the form [a+sqrt(b)]/[c+sqrt(d)] (for integers a-d) are also a commutative ring, so you could also perform exact arithmetic on them. Kevin Barry |
Quote:
I'm mainly concerned with clarifying that this isn't specific to (digital) computers. Quote:
|
Sorry I didn't get back to this.
Biginteger isn't bad and may be all that there is. I was looking for options. The cuda idea is one that I'll pursue maybe. If anyone has done this in python or perl I'd like their opinions. |
Python can handle 30000 to the power of 30000 just fine.
Code:
a = 30000 ** 30000 |
a = 30000 * 30000
Should that be 30000 ** 30000 ? Or maybe math.pow(30000, 30000) I guess I need to learn python and install it and try it. |
All times are GMT -5. The time now is 02:19 PM. |