[Sarnold] 2July2005 -- ''Bigfloat for Tcl'' is a mathematic package located at [http://sarnold.free.fr/bigfloat/index.en.html] It is present in the [tcllib] CVS repository, but not yet released. It relies on the math::bignum package, for big integers conveniences. See the ChangeLog at [http://sarnold.free.fr/bigfloat/CHANGELOG.txt] French page at [http://sarnold.free.fr/bigfloat/] ---- [AM] (2 february 2005) I realised the other day that this package can not only be used to compute with high accuracy, you can use it to inspect the effect of ''any'' number of decimals. This is not uncommon in textbooks on numerical analysis. [Sarnold] I am sorry, but I don't see what you mean. Could you give an example of inspecting this effect ? [AM] Suppose you have a vector (1.100,1.001) (so three decimals), to compute the length you ''could'' do: expr {hypot(1.100,1.001)} but that would mean that you use all decimals that a floating-point number in Tcl has (some 12). You can not easily do the computation with ''only'' the significant decimals. (Well you could truncate the number, but that is not quite the same). If instead you rely on the computations to be done using no more than three decimals (including the intermediate results), the effect of limited decimals becomes clearer - you simply vary the number of decimals. An example of this kind of analysis can be found in: J.C. Nash Compact Numerical Methods for Computers, (Adam Hilger, 1990) ---- [Sarnold] 04/01/2005 BigFloat for Tcl ''v1.1a1'' is released at [http://sarnold.free.fr]. The test suite and the doctools man page are written. Just one problem : the test suite runs in 2 min. It would be too long for including it in tcllib, wouldn't it be ? [AM] (4 january 2005) Testsuites are meant to check the code, they are used every once in a while. I do not think 2 minutes is too long, though of course that depends on the number of tests too :) [LV] Shoot - if it ran for an hour, that would be fine with me - though I think I'd like it to let me know that was coming. What I would want, however, was assurance that in the end, the package is working really well... [Sarnold] It takes approx. 120 seconds, but it does 592 unit tests. The way it works : it compares the result with [expr]' same function, so the comparison is limited to 12 decimals. [AK]: The first testsuite for [grammar_fa] ran several ten-thousands of tests and took 20 minutes or longer. The largest stuff has been cut, but it is still in the several minutes range. So, your two minutes and 600 tests are not really that much. I do not consider this an impediment to the integration of that code. [Sarnold] Thank you for your remarks. It does not bother anymore to have such a test suite. I consider the discussion closed. ----- [Sarnold] 14/12/2004 ''BigFloat for Tcl v1.0'' is released at [http://sarnold.free.fr]. This is a library that handles floating-point numbers with (possibly) hundreds of digits, with full support of trigonometry, log, exp, pi, etc. This is a rewriting of [MPA]. All functions are shipped in the ''::math::bigfloat'' namespace. There is a test suite, and a demonstration that takes the form of a RPN calculator, in both starkit and starpack forms. I think the next thing is to produce a decent manual in doctools format, and then a test suite that fits into tcllib. ''done 19/12/2004'' ----- '''Past discussion :''' [LV] Is the intent for this to be a tcl script only package; something that might be contributed to tcllib? [Sarnold] Sure, I first asked if MPA could be contributed to tcllib, and after I realized there was an interest for it, I decided that MPA would become BigFloat for Tcl. I am currently rewriting all MPA into one namespace called ''::math::bigfloat'' and the name of the package should be ''bigfloat''. There is a lot of work, but I think I will have done it for February 2005. Wait and see. ''Done, but the package has to be brought to tcllib'' ---- [TV] ''(feb 3 '04)'': [Maxima] also has infinte accuracy numbers and computations, of course bounded by the computers' memory and it's efficiency and your time to wait for the answer. And tcl is in fact used in the main interface of the recent versions of the currently open source mathematics package. It can be most easily integrated with tcl probably by using the process as a function call, which works fine under linux, see [Bwise blocks using exec maxima] for examples. Of course then one can also ''manipulate'' formulas and variables with numerals, but the package isn't extremely compact, and probably not necessarily fast for big numbers. Symbolics win of approximations in the end for problems which are solved by them, of course.. ----- [Category Mathematics] [Category Package]