www.delorie.com/archives/browse.cgi | search |
From: | moshier AT mediaone DOT net () |
Subject: | Re: high precision nonlinear math functions ? |
Newsgroups: | comp.os.msdos.djgpp |
References: | <Pine DOT SUN DOT 3 DOT 91 DOT 981115130608 DOT 1381G-100000 AT is> |
X-Newsreader: | TIN [version 1.2 PL2] |
Lines: | 34 |
Message-ID: | <7lF32.59$5O6.224070@lwnws01.ne.mediaone.net> |
Date: | Sun, 15 Nov 1998 18:47:31 GMT |
NNTP-Posting-Host: | 24.128.118.69 |
X-Trace: | lwnws01.ne.mediaone.net 911155651 24.128.118.69 (Sun, 15 Nov 1998 13:47:31 EDT) |
NNTP-Posting-Date: | Sun, 15 Nov 1998 13:47:31 EDT |
Organization: | Northeast Region--MediaOne |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote: : On Thu, 12 Nov 1998, Anton Helm wrote: : > I've some problems with numerical precision : > of some math functions. : > : > Is there any math lib available that can do these : > computations in long double ? The specific problem you posed is due to cancellation error. It should not require extra precision. If you want to resurrect the long double functions that used to exist, look at djgpp/src/libc/ansi/math. For the most part you just need to change instructions like fldl to fldt and fix a few constants from double to long double. : ``Long double'' and ``fast'' don't live together well enough ;-). 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. : The new libm from the beta release of v2.02 should be more accurate, : so you might give it a try. In many cases the new libm is actually less accurate than the coprocessor functions because the coprocessor results are long double but fdlibm was not designed to take advantage of long double. Consequently the fdlibm functions have more roundoff error. For practical calculations there is no reason to prefer the new libm over the coprocessor.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |