home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!wupost!sdd.hp.com!mips!msi!snoopy!bill
- From: bill@snoopy (Bill Poitras)
- Subject: Re: bug in expr?
- Message-ID: <1992Jul22.000400.13694@msi.com>
- Sender: usenet@msi.com (USENET)
- Reply-To: bill@msi.com
- Organization: Molecular Simulations, Inc.
- X-Newsreader: Tin 1.1 PL4
- References: <1992Jul21.215415.23716@crd.ge.com>
- Date: Wed, 22 Jul 1992 00:04:00 GMT
- Lines: 22
-
- kennykb@dssv01.crd.ge.com (Kevin B. Kenny) writes:
- :
- : Can someone explain the following? More to the point, can someone fix it?
- :
- : wish: set x [expr 400000.0+500000.0]
- : 900000
- : wish: set y [expr $x*$x]
- : -1748818944
- :
- : The square of 900000.0 oughtn't to be a large negative number.
-
- What should it be? Overflow? It helps to specify what you want. In tcl
- as it is, creating a result larger than 2^32 is undefined. What do you
- want it defined as?
-
- --
- +-----------------+-------------------------------+-------------------------+
- | Bill Poitras | Molecular Simulations Inc. | Tel (408)522-9229 |
- | (bill) | Sunnyvale, CA USA | |
- | | FAX (408)732-0831 | bill@msi.com |
- +-----------------+-------------------------------+-------------------------+
-
-