Mpexpr was written as a TCL extension by Tom Poindexter, who has sourced a number of TCL things.
In Tom's words:
Mpexpr is a multiple precision math package for Tcl. Mpexpr adds two new commands to Tcl: mpexpr and mpformat. mpexpr is used just like Tcl's expr command, except it allows you to calculate with ridiculously large numbers. Or ordinary average size numbers, without the binary floating point to decimal floating point conversion problems that expr sometimes experiences. For example:% set mp_precision 50 50 % mpexpr 2.0/3.0 0.66666666666666666666666666666666666666666666666667 % mpexpr atan(1.0)*4 ;# common pi approximation 3.14159265358979323846264338327950288419716939937511 % mpexpr fact(34) ;# factorial 295232799039604140847618609643520000000Mpexpr is based on Tcl's expr command, and David Bell's fine Calc program, which is now enhanced and maintained by Landon Curt Noll.
Tom's last release of Mpexpr was version 1.0, and includes a Windows DLL for TCL 8.0. It is available for download here. This source should work well when compiled on any *nix OS, and using MS Visual C++ version 5 or older on Windows.
Mpexpr was successfully compiled on MacOS 9 at some point, but I cannot find it any longer. A version of Mpexpr compiled to MacOS X is available from the porter at SESAM Microcomputer GMBH, and will be available on the SourceForge site.
Mpexpr, lightly hacked to compile on Windows for versions of TCL >8.3, is available in DLL format here. *** If you do not have Microsoft VC70 stuff already installed, you may need a copy of msvcr70.dll in your c:\win*\system* directory. *** The bugs of the Windows version are still being worked out, and will be integrated into the mpexpr release very soon. The DLL will then become a branch on the tree rather than a stub from this page.
If you have suggestions, bug reports, code modifications, etc., please feel free to use the SourceForge Support Request Forum. E-mail to me or another project admin will be received but may not receive a personal reply.
Thanks to SourceForge.net for hosting the project and CVS tree!