Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2.fluke 9/24/84; site cal-dbb.fluke.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!vax135!cornell!uw-beaver!fluke!zoro From: zoro@fluke.UUCP (Mark Hinds) Newsgroups: net.lang.c Subject: Re: C Floating point arithmetic Message-ID: <2486@cal-dbb.fluke.UUCP> Date: Fri, 6-Dec-85 20:35:48 EST Article-I.D.: cal-dbb.2486 Posted: Fri Dec 6 20:35:48 1985 Date-Received: Sat, 7-Dec-85 20:31:55 EST References: <706@lasspvax.UUCP> <4614@alice.UUCP> <793@umd5.UUCP> <42@brl-tgr.ARPA> Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 27 In article <42@brl-tgr.ARPA> gwyn@brl-tgr.ARPA (Doug Gwyn ) writes: >I agree that in most cases where the loss of speed might really >matter, double precision is usually needed anyway to get >meaningful results. Some people, though, judge code more on how >fast it runs than on whether it performs a useful function >correctly. I previously worked for a physics lab that did simulations of shock waves traveling through materials. The programs which blindly used double precision for everything invariably ran significantly slower (half or worse) than those which used only the doubles that were really needed. The programs which made judicious use of doubles were just as "accurate" as the all double programs. Accuracy in this case is measured by how well simualtion could predict experimental results. The usuall result of inappropriate singles is not inaccuracy, but wildly erroneuos results and/or programs which hang due to non-convergence. Mark Hinds -- ____________________________________________________________ Mark Hinds {decvax,ihnp4}!uw-beaver!--\ John Fluke Mfg. Co., Inc. {sun,allegra}!---> fluke!zoro (206) 356-6264 {ucbvax,hplabs}!lbl-csam!--/