Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!olivea!samsung!crackers!jjmhome!smds!rh From: rh@smds.UUCP (Richard Harter) Newsgroups: comp.lang.c Subject: Re: Floating Point Arithmetic Summary: Technically true, but misleading Message-ID: <232@smds.UUCP> Date: 10 Nov 90 07:59:36 GMT References: <27095.9010261638@olympus.cs.hull.ac.uk> <14366@smoke.brl.mil> <14406@smoke.brl.mil> Organization: SMDS Inc., Concord, MA Lines: 23 In article <14406@smoke.brl.mil>, gwyn@smoke.brl.mil (Doug Gwyn) writes: > In article rang@cs.wisc.edu (Anton Rang) writes: > > Of course, it's just as easy to write code which will give you > >double-precision garbage as it is to get single-precision garbage. > I disagree. Except for special, heavily iterative algorithms that would > probably not be attempted by the naive, generally double-precision > arithmetic produces usable answers more often than single-precision would. One can scarcely argue with this -- it is in the nature of things that double precision will be more accurate than single precision! However it is somewhat misleading. In the majority of situations answers and data with 3-4 places of precision are all that are required or are meaningful. The loss of precision is typically 3 places or less; 32 bit single precision (float on most machines today) is sufficient. Situations where 32 bit precision does not suffice are usually either numerically poorly conditioned or inherently require high precision. In these cases double precision is a dangerous nostrum -- one should do one's numerical analysis homework. -- Richard Harter, Software Maintenance and Development Systems, Inc. Net address: jjmhome!smds!rh Phone: 508-369-7398 US Mail: SMDS Inc., PO Box 555, Concord MA 01742 This sentence no verb. This sentence short. This signature done.