Implementation of half-cycle trignometric functions
Steve Kargl
sgk at troutmask.apl.washington.edu
Fri Apr 28 04:18:51 UTC 2017
On Thu, Apr 27, 2017 at 04:14:11PM -0700, Steve Kargl wrote:
> >
> > The code is attached the bug reportr.
> >
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218514
> >
>
> I have attached a new diff to the bugzilla report. The
> diff is 3090 lines and won't be broadcast the mailing list.
>
> This diff includes fixes for a few inconsequential bugs
> and implements modified Estrin's method for sum a few
> ploynomials. If you want the previous Horner's method
> then add -DHORNER to your CFLAGS.
>
Grrrr. Find a sloppy theshold can be fun.
Index: src/s_cospif.c
===================================================================
--- src/s_cospif.c (revision 1916)
+++ src/s_cospif.c (working copy)
@@ -61,7 +61,7 @@
SET_FLOAT_WORD(ax, ix);
if (ix < 0x3f800000) { /* |x| < 1 */
- if (ix < 0x39000000) { /* |x| < 0x1p-13 */
+ if (ix < 0x38800000) { /* |x| < 0x1p-14 */
if (huge + ax > 0) /* Raise inexact iff != 0. */
return (1);
}
--
Steve
20170425 https://www.youtube.com/watch?v=VWUpyCsUKR4
20161221 https://www.youtube.com/watch?v=IbCHE-hONow
More information about the freebsd-numerics
mailing list