Maxima's bfloat numbers can get extremely large. You can input them using
'b' instead of 'e' for the power of 10. Thus 1b3 represents 1000.
Subsequent computations on them use big-float arithmetic.
Maxima has no problem with 2^(2^2000) evaluated as a bfloat, for example.
In the output below, I have highlighted the exponent (the power of 10).
2.0b0^(2.0b0^2000);
=> 3.954321263044257b
34562177822009255436831771492780752014419397859685156564300047005093295669814583169655429955516019096365472100059311688354211430039629171659459982225125722079548179398050195003552747338079110879303958903231988710460034231085372641840002693680270104032043279655420791270887203029307430621158399305589493219427886637295801033478437424269416678330328325817749893785990366372931043324370077151721308397687638562569103076954744702920346371010699643252550546682131543092387568279797119156364672253702003572083211982492107443200794810060207598706641724230723354233821162660074256725841447891539043876728044639
Division of large numbers is not a problem:
2.0b0^(2.0b0^2000)/2.0b0^(2.0b0^1945);
Evaluation took 0.3700 seconds (0.3700 elapsed)
(%o12) 6.238417023051269b
34562177822009254477538631513190230919882264198502274525329863167138582803799194289116578003937159594369029797429483986237104059764420373215586899462436956149145316541927855941377378119119307939000161309521497864530425380545992213293120101442087023396829693119003993790764825550390500136549055148495529575227321016198035615235677638736229970100819341753504470858839463354633270851415623488373786701615688744269751709885679121206667075162295279609359856537528280686752013998718363700307459023723085361126143166822340015521968497148237023469999400189809047656107934265537213000221888957972468505055845028
But be careful about preserving accuracy when dealing with approximate
(floating-point) numbers in general -- not just very large ones. For
example, the exact value of (10^20-1)/(10^20+1)-1
is -2/100000000000000000001, but the default precision bfloat result is 0:
(10b0^20-1)/(10b0^20+1)-1 => 0.0b0.
What you want to search for is information on "numerical analysis",
"floating-point calculation", etc. One good place to look is Prof. Kahan's
homepage <http://www.cs.berkeley.edu/~wkahan/>. Though a lot of it is quite
advanced, there is also a lot of good introductory material. Depending on
your interests, you might want to look at "What Every Computer Scientist
Should Know about
Floating-Point<http://docs.sun.com/source/806-3568/ncg_goldberg.html>
".
Hope this helps.
-s
On Thu, Aug 5, 2010 at 12:22, Bastiaan Bergman <Bastiaan.Bergman at wdc.com>wrote:
> Dear group,
>
>
>
> I want to numerically evaluate an expression obtained by Maxima (or any
> other CAS for that matter). Doing that I frequently hit on an expression
> that cannot be evaluated because it involves parts with extremely big
> numbers. What is the general approach to solve such problem? Is there a
> branch of science working on such problems, how is that called (what do I
> Google)?
>
>
>
> E.g.:
>
>
>
> Exp: (sinh(f1(x))+cosh(f2(x)))/(sinh(f3(x))*cosh(f4(x)))
>
>
>
> Numerical evaluation involves division of extremely big numbers, that, if
> it could be done, gives the correct output. However, numbers quickly get too
> big for any reasonable x to be practically possible.
>
>
>
>
>
> Best regards,
>
> Bastiaan.
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>