Changeset 901
- Timestamp:
- Sep 4, 2011, 2:28:59 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/trig.cpp
r900 r901 388 388 if (lol_fabs(absx) > QUARTER) 389 389 { 390 sign = (x * absx >= 0.0) ? sign : -sign; 390 cos_sign = sin_sign; 391 sin_sign = (x * absx >= 0.0) ? sin_sign : -sin_sign; 391 392 392 393 double x1 = HALF - lol_fabs(absx); … … 397 398 double subs2 = (CC[4] * x4 + CC[2]) * x4 + CC[0]; 398 399 double taylors = subs2 * x2 + subs1; 399 *sinx = taylors * si gn;400 401 double subc1 = ( SC[3]* x4 + SC[1]) * x4 + ONE;400 *sinx = taylors * sin_sign; 401 402 double subc1 = ((SC[5] * x4 + SC[3]) * x4 + SC[1]) * x4 + ONE; 402 403 double subc2 = (SC[4] * x4 + SC[2]) * x4 + SC[0]; 403 404 double taylorc = subc2 * x2 + subc1; 404 *cosx = x1 * taylorc * sign * PI;405 *cosx = x1 * taylorc * cos_sign * PI; 405 406 406 407 return; … … 408 409 #endif 409 410 411 #if !defined __CELLOS_LV2__ 410 412 sin_sign *= (x >= 0.0) ? PI : NEG_PI; 413 #endif 411 414 412 415 double x2 = absx * absx; 413 416 double x4 = x2 * x2; 414 417 #if defined LOL_FEATURE_VERY_CHEAP_BRANCHES 415 double subs1 = (( CC[5] * x4 + SC[3]) * x4 + SC[1]) * x4 + ONE;418 double subs1 = ((SC[5] * x4 + SC[3]) * x4 + SC[1]) * x4 + ONE; 416 419 double subs2 = (SC[4] * x4 + SC[2]) * x4 + SC[0]; 417 420 double subc1 = ((CC[5] * x4 + CC[3]) * x4 + CC[1]) * x4 + ONE;
Note: See TracChangeset
for help on using the changeset viewer.