This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv3] New generic sinf




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)))).  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]