Message-ID: <36503B56.9B8D099E@cyberoptics.com> From: Eric Rudd Organization: CyberOptics X-Mailer: Mozilla 4.05 [en] (Win95; U) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: high precision nonlinear math functions ? References: <7lF32.59$5O6 DOT 224070 AT lwnws01 DOT ne DOT mediaone DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 20 Date: Mon, 16 Nov 1998 08:48:55 -0600 NNTP-Posting-Host: 206.144.150.73 X-Trace: news2.randori.com 911227685 206.144.150.73 (Mon, 16 Nov 1998 06:48:05 PDT) NNTP-Posting-Date: Mon, 16 Nov 1998 06:48:05 PDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com moshier AT mediaone DOT net wrote: > In x86 coprocessors, not only the arithmetic but also the elementary > functions like log and tan are computed in long double anyway, > so there is essentially no speed difference. True, but there are a few caveats: 1. Existing "double" routines get args passed on the stack, so they are rounded to 53 bits, even though the result winds up on the FPU stack in the long double format, so one has to change the arg-passing mechanism. 2. For functions that are ill-conditioned, such as exp() for large arguments, precision *greater* than long double must be used in internal computations. Thus, if one makes the obvious changes to a double routine, it may have long double accuracy only in parts of the ranges. -Eric Rudd rudd AT cyberoptics DOT com