Path: utzoo!attcan!uunet!samsung!crackers!jjmhome!smds!rh From: rh@smds.UUCP (Richard Harter) Newsgroups: comp.lang.c Subject: Re: Floating Point Arithmetic Summary: Know how much precision you need Message-ID: <233@smds.UUCP> Date: 11 Nov 90 07:00:51 GMT References: <14366@smoke.brl.mil> <14406@smoke.brl.mil> <232@smds.UUCP> <1143@sunc.osc.edu> Organization: SMDS Inc., Concord, MA Lines: 29 In article <1143@sunc.osc.edu>, djh@xipe.osc.edu (David Heisterberg) writes: > In article <232@smds.UUCP> rh@smds.UUCP (Richard Harter) writes: > > 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. > There is also the case of theoretical work, such as quantum chemistry, > for which all data is known exactly: in atomic units hbar = 1.0, qe = -1.0, > me = 1.0, etc. It's not uncommon to "out do" others by calculating > energies that are less than 1 part in 10^6 lower than previous values. > For such comparisons to have meaning in the face of a few large matrix > diagonalizations, double precision is a must. Well, this is one of the categories I had in mind. Certainly in theoretical calculations where you want high final precision you need high intermediate precision. However you still need to know how much precision you need. A simple minded "I need more precision so I will use double precision" is what I was referring to as a "dangerous nostrum". If your computational process is not eating precision then the precision you use is the precision you get. If the computational process is eating precision then you do not know what the resulting precision is unless you've done your 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.