Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] Real Numbers representation in Tcl language
  • From: Roger Oberholtzer <roger@xxxxxx>
  • Date: Wed, 12 Apr 2006 16:53:57 +0200
  • Message-id: <200604121653.57183.roger@xxxxxx>
On Wednesday 12 April 2006 07:43, Greg Wallace wrote:
> On Tuesday, April 11, 2006 @ 8:04 PM, Maura E. Monville wrote:
> >Is it possible that on a 32-bit machine the maximum value for a Real
> >number in Tcl language is 10^10 ?
> >
> >Instinctively I'd saythe number of bits assigned to the representation of
> >a Real number is independent on the machine h/w architecture ... but I'm
> >not familiar with Tcl and may be mistaken ...
> >
> >Thank you,
> >MEM
>
> Well, I'm just waging here, but in order to store an ordinate of 10, the
> computer would only need to have 4 bits assigned to store said ordinate.
> 10 would be 1010. I don't know anything about TCL language, but, if you
> can't store a number of that size, it's not a hardware issue, certainly not
> on a 32 bit machine. But it's pretty safe to say that the maximum ordinate
> is indeed dependent on machine architecture. I mean, if you have 64 bits
> available instead of 32, you can store both more precision and more order
> of magnitude than on a 32 bit machine. Now, whether the particular
> language you are coding in is aware of the fact that it has those extra
> bits to work with is a totally different matter.

Tcl simply uses the underlying machine's representation. No funny stuff. An
integer is 32 bits.


--
Roger Oberholtzer
OPQ Systems AB


< Previous Next >
Follow Ups
References