I'm using ActiveState ActiveTcl 8.5.0.0 and would like to use this bignum package. When I try 'package require math::bignum' I get "can't find package math::bignum." Any help would definitely be appreciated. I've provided a link below for more info on this package.
Do you have tcllib installed? If not, there are a few ways to get it:
* you could install ActiveTcl 8.4 alongside 8.5. I would uninstall 8.5, install 8.4, then reinstall 8.5. It's not as complicated as it sounds; the process shouldn't take more than a few minutes.
* you could use teapot/teacup to fetch it for you: http://wiki.tcl.tk/7579 . I've never used it so I can't help you any more there.
* you could just go to http://tcllib.sourceforge.net/ and download it. If you go this route, you have to put it into a directory in your $auto_path, or else append the directory where you put it to your $auto_path.
> Do you have tcllib installed? If not, there are a few ways to get it:
> * you could install ActiveTcl 8.4 alongside 8.5. I would uninstall > 8.5, install 8.4, then reinstall 8.5. It's not as complicated as it > sounds; the process shouldn't take more than a few minutes.
> * you could use teapot/teacup to fetch it for you:http://wiki.tcl.tk/7579 > . I've never used it so I can't help you any more there.
> * you could just go tohttp://tcllib.sourceforge.net/and download > it. If you go this route, you have to put it into a directory in your > $auto_path, or else append the directory where you put it to your > $auto_path.
> Hope that helps, > Aric
I'm not sure if I have tcllib installed. I went ahead and uninstalled ActiveTcl 8.5 and downloaded the Windows packages for 8.4.18 and 8.5.2. When installing the two versions, should I install them both to the same directory or different directories? I'm guessing they should be installed to different ones but just wanted to make sure. Thanks for the help! =)
On Apr 24, 10:24 am, "bwilso...@gmail.com" <bwilso...@gmail.com> wrote:
> I'm using ActiveState ActiveTcl 8.5.0.0 and would like to use this > bignum package. When I try 'package require math::bignum' I get > "can't find package math::bignum." Any help would definitely be > appreciated. I've provided a link below for more info on this > package.
Aside from the tcllib install issue, are you really sure you want that package in conjunction with 8.5? That package was written for 8.3/8.4, prior to Tcl's core inclusion of bignum support. I believe that you should be able to just rely on the core exprs now for what you need.
> On Apr 24, 10:24 am, "bwilso...@gmail.com" <bwilso...@gmail.com> > wrote:
> > I'm using ActiveState ActiveTcl 8.5.0.0 and would like to use this > > bignum package. When I try 'package require math::bignum' I get > > "can't find package math::bignum." Any help would definitely be > > appreciated. I've provided a link below for more info on this > > package.
> Aside from the tcllib install issue, are you really sure you want that > package in conjunction with 8.5? That package was written for > 8.3/8.4, prior to Tcl's core inclusion of bignum support. I believe > that you should be able to just rely on the core exprs now for what > you need.
> Regards,
> Jeff
I just want the best performance method of manipulating arbitrary precision numbers. Like converting between base 2, 10, and 16, etc. I know they added 64-bit support to TCL 8.5 but do you know if there are ways of handling arbitrary length numbers? I've used mpexpr before as well.
bwilso...@gmail.com wrote: > I just want the best performance method of manipulating arbitrary > precision numbers. Like converting between base 2, 10, and 16, etc. > I know they added 64-bit support to TCL 8.5 but do you know if there > are ways of handling arbitrary length numbers? I've used mpexpr > before as well.
As Jeff Hobbs already pointed out, Tcl 8.5 does support arbitrary length integers natively, and you can also easily convert to base 10 from base 2 and 16 with expr:
I don't know a quick way to go from base 10 to either 2 or 16, though. I would have guessed that "format %x" should do the job, but apparently it's currently limited to 64 bits...
On Apr 24, 10:04 am, "bwilso...@gmail.com" <bwilso...@gmail.com> wrote:
> I'm not sure if I have tcllib installed. I went ahead and uninstalled > ActiveTcl 8.5 and downloaded the Windows packages for 8.4.18 and > 8.5.2. When installing the two versions, should I install them both > to the same directory or different directories? I'm guessing they > should be installed to different ones but just wanted to make sure. > Thanks for the help! =)
It looks like people smarter than me have addressed the core issue, but to answer your question, they should be installed to the same directory. ActiveTcl 8.4 is a "batteries-included" distro, while 8.5 is designed to be "batteries-available-via-teacup"; if they are in the same directory, they can share the batteries :) ActiveState has designed the two distributions so that they can coexist in the same directory.
Alternatively, if you have some compelling reason to put them in different directories (for example, you already installed them that way and can't be bothered to reinstall them) you can set or modify the TCL_LIBRARY environment variable so that it includes the library directory of the 8.4 install.
Aric Bills wrote: > Alternatively, if you have some compelling reason to put them in > different directories (for example, you already installed them that > way and can't be bothered to reinstall them) you can set or modify the > TCL_LIBRARY environment variable so that it includes the library > directory of the 8.4 install.
NO!
No, no, no, no, no no.
TCL_LIBRARY is all about where to find the "init.tcl" file during Tcl_Init(). It has (nearly) nothing to do with the search for installed packages. And it should not be set except as a very last resort by an end user working around a broken install of a program he cannot fix.
TCLLIBPATH is what you want.
-- | Don Porter Mathematical and Computational Sciences Division | | donald.por...@nist.gov Information Technology Laboratory | | http://math.nist.gov/~DPorter/ NIST | |______________________________________________________________________|
> Aric Bills wrote: > > Alternatively, if you have some compelling reason to put them in > > different directories (for example, you already installed them that > > way and can't be bothered to reinstall them) you can set or modify the > > TCL_LIBRARY environment variable so that it includes the library > > directory of the 8.4 install.
> NO!
> No, no, no, no, no no.
> TCL_LIBRARY is all about where to find the "init.tcl" file during > Tcl_Init(). It has (nearly) nothing to do with the search for installed > packages. And it should not be set except as a very last resort by an > end user working around a broken install of a program he cannot fix.
> TCLLIBPATH is what you want.
> -- > | Don Porter Mathematical and Computational Sciences Division | > | donald.por...@nist.gov Information Technology Laboratory | > |http://math.nist.gov/~DPorter/ NIST | > |______________________________________________________________________|