Date: Wed, 13 May 1998 11:50:28 +0300 (IDT) From: Eli Zaretskii To: Kbwms cc: djgpp AT delorie DOT com Subject: Re: Code to Fix sinh() in libm.a In-Reply-To: <42dba229.3558c70d@aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 12 May 1998, Kbwms wrote: > Clearly, one of the problems is that no one pays any attention to > what ELEFUNT produces. It is more probable that the problem was noted but never got to the top of somebody's todo list. > I intend to run the stuff through my version of ELEFUNT because it > is much more comprehensive. Of course, I'll report the results from > ELEFUNT, too. It might be a better idea to change the version of ELEFUNT in djtst201 as well. It is only for DJGPP's needs, so there's no problem to make any changes there we see fit, if they will make the testing more exhaustive. > The scandalous behavior reported above for the identity > sinh(x) = -sinh(-x) is shown again: > > sinh(x) vs. sinh(-x) for random values > x = 1.7313932765, sinh(x) + sinh(-x) = 5.247538515E-17 > x = 2.5142214602, sinh(x) + sinh(-x) = -5.074066167E-17 > x = 1.8964167239, sinh(x) + sinh(-x) = 7.090682208E-17 > x = 2.5792200716, sinh(x) + sinh(-x) = 3.955169525E-16 > x = 2.1011919701, sinh(x) + sinh(-x) = 3.851086117E-16 Why is this scandalous? The relative error here is less than the double-precision machine epsilon, so where's the scandal? (Of course, if the accuracy can be improved even more, I'm for it.)