34 #ifndef MATHLIB_SINH_SCALAR_H_
35 #define MATHLIB_SINH_SCALAR_H_
37 #include "../common/MATHLIB_scalarTables.h"
38 #include "../common/MATHLIB_types.h"
39 #include "c6x_migration.h"
48 #pragma CODE_SECTION(expsp_sinhsp_i, ".text:optci");
58 const float log2_base_x16 = 23.0831206542234f;
59 const float Half = 0.5f;
60 const float LnMax = 88.72283905f;
61 const float Ln2 = 0.693147180559945f;
62 const double p = 0.0433216987816623;
65 const float c0 = 0.166668549286041f;
66 const float c1 = 0.500016170012920f;
67 const float c2 = 0.999999998618401f;
69 float pol, r, r2, r3, res;
70 unsigned int Ttemp, J, K;
76 Nf = (x * log2_base_x16) + Half;
85 r = (float) ((
double) x - (p * (double) N));
89 pol = (r * c2) + ((r3 * c0) + (r2 * c1));
94 K = _extu((
unsigned int) N, 28u, 30u);
95 J = (
unsigned int) N & 0x3u;
99 Ttemp = _hi(dT) + (((
unsigned int) N >> 4) << 20);
100 dT = _itod(Ttemp, _lo(dT));
102 res = (float) (dT * (1.0 + (
double) pol));
106 if ((x - Ln2) > LnMax) {
107 res = _itof(0x7F800000u);
114 #pragma CODE_SECTION(recipsp_sinhsp_i, ".text:optci");
124 const float two = 2.0f;
128 y = y * (two - (a * y));
129 y = y * (two - (a * y));
144 #pragma CODE_SECTION(pol_est_sinhsp_i, ".text:optci");
159 const float c8 = 2.75573192239859e-6f;
160 const float c6 = 0.000198412698412698f;
161 const float c4 = 0.00833333333333333f;
162 const float c2 = 0.166666666666667f;
164 float x2, x4, x6, x8, pol;
178 pol = ((c2 * x2) + (c4 * x4)) + ((c6 * x6) + (c8 * x8));
185 #pragma CODE_SECTION(MATHLIB_sinh_scalar_ci, ".text:optci");
203 const float half = 0.5f;
204 const float bound = 16.0f;
205 const float Max = 89.41598629f;
206 const float pol_bound = 1.0f;
208 float res, temp, exp_, x_abs;
220 else if (x_abs <= pol_bound) {
226 res = (exp_ - temp) * half;
230 res = _itof(0x7F800000u);
const double MATHLIB_kTable[4]
const double MATHLIB_jTable[4]
static float MATHLIB_sinh_scalar_ci(float x)
static float recipsp_sinhsp_i(float a)
static float pol_est_sinhsp_i(float x)
static float expsp_sinhsp_i(float x)