Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!uw-beaver!tektronix!cae780!hplabs!hpcea!hpsrla!hpsrlc!darrylo From: darrylo@hpsrlc.HP.COM (Darryl Okahata) Newsgroups: comp.sys.ibm.pc Subject: Re: Turbo C division bug Message-ID: <3320023@hpsrlc.HP.COM> Date: Fri, 19-Jun-87 11:27:58 EDT Article-I.D.: hpsrlc.3320023 Posted: Fri Jun 19 11:27:58 1987 Date-Received: Mon, 22-Jun-87 06:30:28 EDT References: <105@flnexus.ATT.COM> Organization: Network Measurements Div - Santa Rosa, CA Lines: 45 In comp.sys.ibm.pc, heff@flnexus.ATT.COM (Paul K Heffner) writes: > A couple of people at our site have invested in Turbo C and seem generally > pleased with the package as a really serious compiler (especially for > the price). It does, however, seem to have a serious bug with the floating > point division routines. If your program does division on two constants: > > float x; > > x = 5.0/4.0; > > The result will be as if the division was inverted (i.e x = 4.0/5.0) > > Spencer Katt commented on this in PC Week this week. If you're using > Turbo C for serious programming, you should exercise caution if doing > such calculations. (I assume Borland is working on a fix....) > > Paul Heffner, > AT&T, Orlando > ---------- Borland has had a fix for this for a few weeks now. I really wonder about the publishing lead time for PC Week (I like to call it "PC Leak"), as the Turbo C compilers that you can buy right now have the bug FIXED. I bought my copy of Turbo C about THREE WEEKS ago, and it had this bug fixed. What I don't like is that Borland doesn't change the revision number if a bug gets fixed; one version of Turbo C V1.00 may have a bug fixed, while another V1.00 version may still have it. The only way to tell the compilers apart is to look at the file modification date, which gets trashed if someone patches their compiler. Borland has issued a few DEBUG.COM-type patches (which have to be applied manually -- ugh!) to fix bugs like this floating-point bug, and a few others. Unfortunately, they make these patches available on Compuserve, which many people here, I believe, do not have access to. -- Darryl Okahata ... hplabs!hpcea!hpsrla!darrylo Disclaimer I: the above is the author's personal opinion and is not the opinion or policy of his employer or of the little green men that have been following him all day. Disclaimer II: I have no connections with Borland, other than being a mostly satisfied customer.