From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,dbd5e8a2d19cc3f9 X-Google-Attributes: gidfee84,public From: Steve.Lionel@compaq.com (Steve Lionel) Subject: Re: Inaccurate logarithm in Pascal Date: 1999/03/23 Message-ID: <36ffa646.349337953@usenet.pa.dec.com>#1/1 X-Deja-AN: 458058229 Content-Transfer-Encoding: 7bit References: <7d81qg$soq$1@news.net.uni-c.dk> Content-Type: text/plain; charset=us-ascii Organization: Compaq Computer Corporation Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 On Tue, 23 Mar 1999 13:37:30 +0100, "Morten Skaarup Jensen" wrote: > >DEC Pascal gives the option of either a fast or an accurate math library. >According to the manual "accurate" is default, but the results of the "ln" >function are only accurate to about 9 significant figures which is not >enough for me. > >Is there a bug in the "ln" function or am I linking to the "fast" math >library? Any help will be appreciated. Do you have a specific example? 9 significant digits is more than I'd expect with single-precision. The "fast" library doesn't necessarily give less accurate results than the "accurate" library, especially if the argument is "reasonable". The fast library is not as careful in doing range reductions (not really an issue for ln) and errors may not get reported properly. Please also indicate what version of Pascal and DIGITAL UNIX you are using. -- Steve Lionel (mailto:Steve.Lionel@compaq.com) Fortran Engineering Compaq Computer Corporation, Nashua NH Compaq Fortran web site: http://www.compaq.com/fortran