34 #ifndef MATHLIB_ACOSH_SCALAR_H_
35 #define MATHLIB_ACOSH_SCALAR_H_
43 #include "../common/MATHLIB_scalarTables.h"
44 #include "../common/MATHLIB_types.h"
45 #include "c6x_migration.h"
59 #pragma CODE_SECTION(logsp_acoshsp_i, ".text:optci");
70 const float c1 = -0.2302894f;
71 const float c2 = 0.1908169f;
72 const float c3 = -0.2505905f;
73 const float c4 = 0.3333164f;
74 const float c5 = -0.5000002f;
76 const double ln2 = 0.693147180559945;
77 const float max = 88.7228390519551f;
78 float pol, r1, r2, r3, r4, res;
79 double dr, frcpax, rcp, T;
84 rcp = _rcpdp((
double) x);
85 frcpax = _itod(_clr(_hi(rcp), 0u, 16u), 0u);
86 dr = (frcpax * (double) x) - 1.0;
95 pol = (c5 * r2) + ((c4 * r3) + ((((c2 * r1) + c3) + (c1 * r2)) * r4));
98 N = (int) _extu(_hi(frcpax), 1u, 21u) - 1023;
99 T_index = _extu(_hi(frcpax), 12u, 29u);
101 res = (float) (dr + T) + pol;
111 #pragma CODE_SECTION(sqrtsp_acoshsp_i, ".text:optci");
123 const float half = 0.5f;
124 const float OneP5 = 1.5f;
125 float x0, x1, x2, x_half, res;
130 x1 = OneP5 - (x_half * x0 * x0);
132 x2 = x1 * (OneP5 - (x1 * x1 * x_half));
147 #pragma CODE_SECTION(MATHLIB_acosh_scalar_ci, ".text:optci");
162 const float ln2 = 0.69314718056f;
163 const float half = 0.5f;
165 float res, sqrt_, temp, x2;
170 temp = (sqrt_ * half) + (x * half);
174 res = _itof(0x7FFFFFFFu);
static float logsp_acoshsp_i(float x)
static float sqrtsp_acoshsp_i(float a, float x)
static float MATHLIB_acosh_scalar_ci(float x)
const double MATHLIB_logTable[8]