Changeset 109 for mppenc/trunk/src/fastmath.c
- Timestamp:
- 11/10/06 22:04:46 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mppenc/trunk/src/fastmath.c
r97 r109 19 19 20 20 #include "mppenc.h" 21 #include "fastmath.h" 21 22 22 23 #ifdef FAST_MATH … … 30 31 void Init_FastMath ( void ) 31 32 { 32 int i; 33 float X; 34 float Y; 35 double xm; 36 double x0; 37 double xp; 38 double x; 39 double y; 40 float* p; 33 int i; mpc_floatint X, Y; double xm, x0, xp, x, y; float* p; 41 34 42 35 p = (float*) tabatan2; … … 64 57 p = (float*) tabsqrt_ex; 65 58 for ( i = 0; i < 255; i++ ) { 66 *(int*)&X= (i << 23);67 *(int*)&Y= (i << 23) + (1<<23) - 1;68 *p++ = sqrt(X );59 X.n = (i << 23); 60 Y.n = (i << 23) + (1<<23) - 1; 61 *p++ = sqrt(X.f); 69 62 } 70 *(int*)&X= (255 << 23) - 1;71 *p++ = sqrt(X );63 X.n = (255 << 23) - 1; 64 *p++ = sqrt(X.f); 72 65 73 66 p = (float*) tabsqrt_m;
Note: See TracChangeset
for help on using the changeset viewer.