Google Groups Home
Help | Sign in
How can I use the bignum package in a Windows environment?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
bwilson79@gmail.com  
View profile
(1 user)  More options Apr 24, 1:24 pm
Newsgroups: comp.lang.tcl
From: "bwilso...@gmail.com" <bwilso...@gmail.com>
Date: Thu, 24 Apr 2008 10:24:10 -0700 (PDT)
Local: Thurs, Apr 24 2008 1:24 pm
Subject: How can I use the bignum package in a Windows environment?
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.

http://aspn.activestate.com/ASPN/docs/ActiveTcl/8.5/tcllib/math/bignu...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aric Bills  
View profile
(1 user)  More options Apr 24, 1:41 pm
Newsgroups: comp.lang.tcl
From: Aric Bills <aric.bi...@gmail.com>
Date: Thu, 24 Apr 2008 10:41:19 -0700 (PDT)
Local: Thurs, Apr 24 2008 1:41 pm
Subject: Re: How can I use the bignum package in a Windows environment?
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.

Hope that helps,
Aric


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bwilson79@gmail.com  
View profile
(1 user)  More options Apr 24, 2:04 pm
Newsgroups: comp.lang.tcl
From: "bwilso...@gmail.com" <bwilso...@gmail.com>
Date: Thu, 24 Apr 2008 11:04:40 -0700 (PDT)
Local: Thurs, Apr 24 2008 2:04 pm
Subject: Re: How can I use the bignum package in a Windows environment?
On Apr 24, 10:41 am, Aric Bills <aric.bi...@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!  =)

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff Hobbs  
View profile
(1 user)  More options Apr 24, 2:47 pm
Newsgroups: comp.lang.tcl
From: Jeff Hobbs <jeff.ho...@gmail.com>
Date: Thu, 24 Apr 2008 11:47:20 -0700 (PDT)
Local: Thurs, Apr 24 2008 2:47 pm
Subject: Re: How can I use the bignum package in a Windows environment?
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.

> http://aspn.activestate.com/ASPN/docs/ActiveTcl/8.5/tcllib/math/bignu...

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


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bwilson79@gmail.com  
View profile
(1 user)  More options Apr 24, 3:14 pm
Newsgroups: comp.lang.tcl
From: "bwilso...@gmail.com" <bwilso...@gmail.com>
Date: Thu, 24 Apr 2008 12:14:12 -0700 (PDT)
Local: Thurs, Apr 24 2008 3:14 pm
Subject: Re: How can I use the bignum package in a Windows environment?
On Apr 24, 11:47 am, Jeff Hobbs <jeff.ho...@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.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Nassau  
View profile
(1 user)  More options Apr 24, 4:12 pm
Newsgroups: comp.lang.tcl
From: Christian Nassau <nore...@nullhomotopie.de>
Date: Thu, 24 Apr 2008 22:12:08 +0200
Local: Thurs, Apr 24 2008 4:12 pm
Subject: Re: How can I use the bignum package in a Windows environment?

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:

% expr 893462639654384386598348 * 98162786243732476432864232378
87704782113154310266601813151301296276690297622911544
% expr 0x183621786317836127879235634897432794237497273249
593662982854666795903284635341811402338104224387248370249
% expr 0b1010101011111111111101111
22413295
% info patchlevel
8.5.2

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...

HTH,
--
  => Christian Nassau, http://www.nullhomotopie.de


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donald G Porter  
View profile
(1 user)  More options Apr 24, 4:26 pm
Newsgroups: comp.lang.tcl
From: Donald G Porter <d...@nist.gov>
Date: Thu, 24 Apr 2008 16:26:04 -0400
Local: Thurs, Apr 24 2008 4:26 pm
Subject: Re: How can I use the bignum package in a Windows environment?

Christian Nassau wrote:
> I would have guessed that "format %x" should do the job, but apparently
> it's currently limited to 64 bits...

% format %llx 1234567890123456789012345
1056e0f36a6443de2df79

--
| Don Porter          Mathematical and Computational Sciences Division |
| donald.por...@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aric Bills  
View profile
(1 user)  More options Apr 24, 6:51 pm
Newsgroups: comp.lang.tcl
From: Aric Bills <aric.bi...@gmail.com>
Date: Thu, 24 Apr 2008 15:51:46 -0700 (PDT)
Local: Thurs, Apr 24 2008 6:51 pm
Subject: Re: How can I use the bignum package in a Windows environment?
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.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Donald G Porter  
View profile
(1 user)  More options Apr 28, 9:07 am
Newsgroups: comp.lang.tcl
From: Donald G Porter <d...@nist.gov>
Date: Mon, 28 Apr 2008 09:07:07 -0400
Local: Mon, Apr 28 2008 9:07 am
Subject: Re: How can I use the bignum package in a Windows environment?

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 |
|______________________________________________________________________|


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aric Bills  
View profile
(1 user)  More options Apr 28, 3:20 pm
Newsgroups: comp.lang.tcl
From: Aric Bills <aric.bi...@gmail.com>
Date: Mon, 28 Apr 2008 12:20:44 -0700 (PDT)
Local: Mon, Apr 28 2008 3:20 pm
Subject: Re: How can I use the bignum package in a Windows environment?
On Apr 28, 5:07 am, Donald G Porter <d...@nist.gov> wrote:

Right you are.  My bad.

Aric


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google