Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site turtlevax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!decwrl!turtlevax!ken From: ken@turtlevax.UUCP (Ken Turkowski) Newsgroups: net.lang.c Subject: Re: C Floating point arithmetic Message-ID: <976@turtlevax.UUCP> Date: Mon, 2-Dec-85 00:10:41 EST Article-I.D.: turtleva.976 Posted: Mon Dec 2 00:10:41 1985 Date-Received: Thu, 5-Dec-85 04:44:07 EST References: <706@lasspvax.UUCP> <4614@alice.UUCP> <793@umd5.UUCP> <608@ttrdc.UUCP> Organization: CIMLINC, Inc. @ Menlo Park, CA Lines: 21 Summary: Numerical analysis can tell whether to use single or double precision In article <608@ttrdc.UUCP>, levy@ttrdc.UUCP (Daniel R. Levy) writes: > ... I surmise there might be testable conditions whereby it > could be determined (without an overly large computational penalty) whether > a computation could be entrusted to single precision or whether double > precision should be used, prior to actually performing the computation. You are indeed correct. The field of numerical analysis is a discipline that is concerned with determining the error in a calculation given the arithmetic precision of a machine. I have done a fair amount of coding in both floating-point and fixed-point arithmetic which carries around as much precision as needed to guarantee correctness of the results. Granted, error analysis can sometimes be painful. One easy way to determine how much precision to carry around is to first do the computations in very high precision, and then decrease the precision until the errors are intolerable. -- Ken Turkowski @ CIMLINC (formerly CADLINC), Menlo Park, CA UUCP: {amd,decwrl,hplabs,seismo,spar}!turtlevax!ken ARPA: turtlevax!ken@DECWRL.DEC.COM