Changeset 787
- Timestamp:
- 09/30/06 23:05:57 (2 years ago)
- Files:
-
- trunk/freewrt/toolchain/libnotimpl/files/math.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/freewrt/toolchain/libnotimpl/files/math.c
r1 r787 8 8 * wrapper for cos(x) 9 9 */ 10 11 #ifdef __STDC__ 12 float cosf(float x) 13 #else 14 float cosf(x) 15 float x; 16 #endif 17 { 10 float cosf(float x) { 18 11 return (float) cos( (double)x ); 19 12 } … … 24 17 * wrapper for sin(x) 25 18 */ 26 27 #ifdef __STDC__ 28 float sinf(float x) 29 #else 30 float sinf(x) 31 float x; 32 #endif 33 { 19 float sinf(float x) { 34 20 return (float) sin( (double)x ); 35 21 } … … 40 26 * wrapper for ceil(x) 41 27 */ 42 43 #ifdef __STDC__ 44 float ceilf(float x) 45 #else 46 float ceilf(x) 47 float x; 48 #endif 49 { 28 float ceilf(float x) { 50 29 return (float) ceil( (double)x ); 51 30 } 52 31 53 54 32 /* rintf for uClibc 55 33 * 56 * wrapper for rint(x) 34 * wrapper for rint(x), workaround with ceil 57 35 */ 58 59 #ifdef __STDC__ 60 float rintf(float x) 61 #else 62 float rintf(x) 63 float x; 64 #endif 65 { 66 return (float) rint( (double)x ); 36 float rintf(float x) { 37 return (float) ceil( (double)x - 0.5); 67 38 } 68


