Robinson Mittmann wrote:
> Looking at the "kernel_sinl" function in "sincosl.c" file I found that
> the limit value for choosing the computation method is wrong with
> respect of the remaining code:
>
> kernel_sinl (long double x, long double y, int iy)
> {
> ...
> if (x < 0.148375L) /* |x| < 0.1484375 */
>
> The correct line should be:
>
> if (x < 0.1484375L) /* |x| < 0.1484375 */
Thanks, this is indeed a typo in the code (since the comments agree with the
value that the current glibc sources use). I've applied your fix.
> Probably a better approach would be defining this limit as a macro.
It would be, if this code was under heavy development.
Bruno
2006-11-22 Robinson Mittmann <[EMAIL PROTECTED]> (tiny change)
* lib/sincosl.c (kernel_sinl): Fix typo in threshold.
*** lib/sincosl.c 14 May 2005 06:03:58 -0000 1.3
--- lib/sincosl.c 22 Nov 2006 18:23:16 -0000
***************
*** 1,5 ****
/* Quad-precision floating point trigonometric functions on <-pi/4,pi/4>.
! Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <[EMAIL PROTECTED]>
--- 1,5 ----
/* Quad-precision floating point trigonometric functions on <-pi/4,pi/4>.
! Copyright (C) 1999, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <[EMAIL PROTECTED]>
***************
*** 113,119 ****
sign = -1;
}
! if (x < 0.148375L) /* |x| < 0.1484375 */
{
/* Argument is small enough to approximate it by a Chebyshev
polynomial of degree 17. */
--- 113,119 ----
sign = -1;
}
! if (x < 0.1484375L) /* |x| < 0.1484375 */
{
/* Argument is small enough to approximate it by a Chebyshev
polynomial of degree 17. */