home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!crdgw1!rdsunx.crd.ge.com!dssv01!kennykb
- From: kennykb@dssv01.crd.ge.com (Kevin B. Kenny)
- Newsgroups: comp.lang.tcl
- Subject: Re: bug in expr?
- Message-ID: <1992Jul22.215800.25832@crd.ge.com>
- Date: 22 Jul 92 21:58:00 GMT
- References: <1992Jul21.215415.23716@crd.ge.com> <1992Jul22.163913.27329@cbnewsm.cb.att.com>
- Sender: usenet@crd.ge.com (Required for NNTP)
- Reply-To: kennykb@crd.ge.com
- Organization: GE R&D, Information Architectures & Management Program
- Lines: 30
- Nntp-Posting-Host: dssv01.crd.ge.com
-
-
- In article <1992Jul22.163913.27329@cbnewsm.cb.att.com>, gah@grenache (George A.
- Howlett) writes:
- |> I think the point that Kevin is making is that if you started out
- |> with floating point values, you should get a floating point result.
- |> The implicit demotion of the sum of two floating point numbers into
- |> a integer result is unexpected. It's fairly easy to detect here,
- |> but insidiously hard to track in more complex usages.
-
- Yes indeed. That was the point. Sorry I hadn't made myself clearer
- -- I'd just been at my terminal for several hours tracking down a
- particularly insidious bug that resulted from the implicit demotion.
-
- The %#g idea is a good one -- I'd forgotten about the `#' flag, also!
- (time to dust off Harbison and Steele...). The OFMT variable might be
- even better. John, do you have any comments?
-
- |> I can repost this patch if anyone's interested.
-
- Thanks, George -- I appear to have missed it.
-
- |> BTW: If you are using the patch to add math library functions,
- |> you could have explicitly promoted x using the "float()"
- |> function.
-
- Gosh, it's time to take another look at *that* patch, too. I've been
- mening to install it. John, can we get that one into the standard
- product? It's needed.
-
- 73 de ke9tv/2, Kevin There isn't any .signature virus, is there?
-