home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / tcl / 1031 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  1.8 KB

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