Originally posted by HeirToBokassa
I can see a programming language being useful to corroborate the apparent pattern. But even 64-bit arithmetic will only give 51 decimal places in
base 2 (in scientific notation)
You cannot have decimal places in binary. You can have binary digits in binary.
Decimal places only exist in base 10.
UBASIC can handle 2600 digits of base 10 non-floating math. This form of BASIC is intended for Huge value Number Theory(All reals and complex
numbers)
If you need floating point, many other languages can suffice. I mentioned BASIC in general as it is very easy to learn, speed is not an issue,
accuracy however, is. There are expansion libraries for it written in asm, that can handle huge floating point values. Example: Quickbasic(Double
Precision = 64-bit floating point) and perhaps a Qb friendly library off of Simtel or futurebasic, may have the cajones to handle it by way of Sci
notation.
Beyond that you would need to emulate arbitrary precision arithmetic
I have already discussed a way to do just that in my prior post.
I'm guessing that UBASIC and XBASIC are slower than C (which is widely perceived as the second fastest language in the world, second only to assembly
language). GNU calc is written in C, can support scripting of its own, and also has shared libraries to write C programs with calc functionality.
UBASIC is an interpreter for MS-Dos. It will be a lot slower than compiled C code, but somewhat comparable to Interpreted C. X-Basic will be much
faster than UBASIC(at a loss of accuracy for different reasons) because it is a compiler. It will still be a tad slower than Visual C++, as it is a
P(re:token based)-code compiler and not a native (re:asm) compiler. Accuracy is the issue, not speed.
This also assumes the user in question can program in C. This goes against the idea of simplicity, as handling the algorithm to achieve said
investigation would be difficult enough in it's own right.
But I think it would be cooler to just prove with the taylor series the convergence to the pattern.
That I can concur with! As well as other patterns of interest, as it can be made to be flexible with any reiterary mask. *cough* arrays/pointers
*cough*
Should speed become an issue, then I would recommend BCX, "Basic to C Translator". Name says it all. It also includes a C compiler for win32, LCC,
so you can make win32 exe files. Thereby avoiding a total code rewrite.
The only reason I even brought up about using BASIC, to handle this task, is in it's simplicity and that it would also be possible to increase
accuracy through arbitrary means, such as, stashing the values into a string array, so the accuracy would only be limited by string array memory,
instead of relying on the limit of decimal places in any other data format.(singe,double, or triple precision floating values) To each their own...
[edit on 29-7-2004 by Crysstaafur]