[PATCHv3] New generic sinf

Manfred mx2927@gmail.com
Thu Nov 2 16:10:00 GMT 2017



On 11/2/2017 4:50 PM, Rajalakshmi Srinivasaraghavan wrote:
> +static inline float
> +reduced (const double theta, const unsigned long n,
> +	 const unsigned long signbit)
> +{
> +  double sx;
> +  const double theta2 = theta * theta;
> +  /* We are operating on|x|, so we need to add back the original
> +   * signbit for sinf.  */
> +  int sign;
> +  sign = ones[((n >> 2) & 1) ^ signbit];
> +  theta2 = theta * theta;
Isn't the above a duplication?

> +  /* Chebyshev polynomial of the form for sin:
> +   * x+x^3*(S0+x^2*(S1+x^2*(S2+x^2*(S3+x^2*S4)))).
Isn't the following an expansion for cos?
> +   * 1.0+x^2*(C0+x^2*(C1+x^2*(C2+x^2*(C3+x^2*C4)))).  */



More information about the Libc-alpha mailing list