Index: language/c/libm/current/cdl/libm.cdl =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libm/current/cdl/libm.cdl,v retrieving revision 1.3 diff -u -r1.3 libm.cdl --- libm.cdl 2001/06/10 19:35:37 1.3 +++ libm.cdl 2001/09/21 01:11:06 @@ -78,7 +78,36 @@ double/portable-api/s_isnan.c double/portable-api/s_ldexp.c \ double/portable-api/s_rint.c double/portable-api/s_scalbn.c \ double/portable-api/s_sin.c double/portable-api/s_tan.c \ - double/portable-api/s_modf.c double/portable-api/s_tanh.c + double/portable-api/s_modf.c double/portable-api/s_tanh.c \ + \ + float/ieee754-core/e_acosf.c float/ieee754-core/e_asinf.c \ + float/ieee754-core/e_atan2f.c float/ieee754-core/e_coshf.c \ + float/ieee754-core/e_expf.c float/ieee754-core/e_fmodf.c \ + float/ieee754-core/e_logf.c float/ieee754-core/e_log10f.c \ + float/ieee754-core/e_powf.c \ + float/ieee754-core/e_rem_pio2f.c \ + float/ieee754-core/e_scalbf.c float/ieee754-core/e_sinhf.c \ + float/ieee754-core/e_sqrtf.c \ + \ + float/ieee754-api/w_acosf.c float/ieee754-api/w_asinf.c \ + float/ieee754-api/w_atan2f.c float/ieee754-api/w_coshf.c \ + float/ieee754-api/w_expf.c float/ieee754-api/w_fmodf.c \ + float/ieee754-api/w_logf.c float/ieee754-api/w_log10f.c \ + float/ieee754-api/w_powf.c float/ieee754-api/w_scalbf.c \ + float/ieee754-api/w_sinhf.c float/ieee754-api/w_sqrtf.c \ + \ + float/internal/k_cosf.c float/internal/k_rem_pio2f.c \ + float/internal/k_sinf.c float/internal/k_tanf.c \ + \ + float/portable-api/s_atanf.c float/portable-api/s_ceilf.c \ + float/portable-api/s_copysignf.c \ + float/portable-api/s_cosf.c float/portable-api/s_expm1f.c \ + float/portable-api/s_fabsf.c float/portable-api/s_finitef.c \ + float/portable-api/s_floorf.c float/portable-api/s_frexpf.c \ + float/portable-api/s_isnanf.c float/portable-api/s_ldexpf.c \ + float/portable-api/s_rintf.c float/portable-api/s_scalbnf.c \ + float/portable-api/s_sinf.c float/portable-api/s_tanf.c \ + float/portable-api/s_modff.c float/portable-api/s_tanhf.c # COMPATIBILITY-MODE RELATED CONFIGURATION OPTIONS Index: language/c/libm/current/include/math.h =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libm/current/include/math.h,v retrieving revision 1.6 diff -u -r1.6 math.h --- math.h 2000/09/19 05:54:00 1.6 +++ math.h 2001/09/21 01:11:06 @@ -284,6 +284,131 @@ expm1( double ); // (exp(x) - 1) but more accurately when // x tends to zero +//=========================================================================== +// Standard ANSI functions. Angles are always in radians + +// Trigonometric functions - ANSI 7.5.2 + +externC float +acosf( float ); // arc cosine i.e. inverse cos + +externC float +asinf( float ); // arc sine i.e. inverse sin + +externC float +atanf( float ); // arc tan i.e. inverse tan + +externC float +atan2f( float, float ); // arc tan of (first arg/second arg) using signs + // of args to determine quadrant + +externC float +cosf( float ); // cosine + +externC float +sinf( float ); // sine + +externC float +tanf( float ); // tangent + +// Hyperbolic functions - ANSI 7.5.3 + +externC float +coshf( float ); // hyperbolic cosine + +externC float +sinhf( float ); // hyperbolic sine + +externC float +tanhf( float ); // hyperbolic tangent + +// Exponential and Logarithmic Functions - ANSI 7.5.4 + +externC float +expf( float ); // exponent + +externC float +frexpf( float, int * ); // break number into normalized fraction (returned) + // and integral power of 2 (second arg) + +externC float +ldexpf( float, int ); // multiples number by integral power of 2 + +externC float +logf( float ); // natural logarithm + +externC float +log10f( float ); // base ten logarithm + +externC float +modff( float, float * ); // break number into integral and fractional + // parts, each of which has same sign as arg. + // It returns signed fractional part, and + // puts integral part in second arg + +// Power Functions - ANSI 7.5.5 + +externC float +powf( float, float ); // (1st arg) to the power of (2nd arg) + +externC float +sqrtf( float ); // square root + +// Nearest integer, absolute value and remainder functions - ANSI 7.5.6 + +externC float +ceilf( float ); // smallest integer >= arg + +externC float +fabsf( float ); // absolute value + +externC float +floorf( float ); // largest integer <= arg + +externC float +fmodf( float, float ); // remainder of (1st arg)/(2nd arg) + +// scalb*() + +externC float // scalbn(x,n) returns x*(2**n) +scalbnf( float, int ); + +#ifdef CYGFUN_LIBM_SVID3_scalb + +externC float +scalbf( float, float ); // as above except n is a floating point arg + +#else +externC float +scalbf( float, int ); // as scalbn() + +#endif // ifdef CYGFUN_LIBM_SVID3_scalb + +// And the rest + + +externC int // whether the argument is NaN +isnanf( float ); + +externC int +finitef( float ); // whether the argument is finite + + +//=========================================================================== +// Non-standard functions + +externC float // copysign(x,y) returns a number with +copysignf( float, float ); // the absolute value of x and the sign of y + +externC float // rounds to an integer according to the +rintf( float ); // current rounding mode + + +// BSD functions + +externC float // expm1(x) returns the equivalent of +expm1f( float ); // (exp(x) - 1) but more accurately when + // x tends to zero #endif // ifdef CYGPKG_LIBM Index: language/c/libm/current/src/mathincl/fdlibm.h =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libm/current/src/mathincl/fdlibm.h,v retrieving revision 1.6 diff -u -r1.6 fdlibm.h --- fdlibm.h 2001/07/29 02:00:10 1.6 +++ fdlibm.h 2001/09/21 01:11:06 @@ -147,7 +147,10 @@ (d) = sl_u.value; \ } while (0) +#define CYG_LIBM_FL(__x) (((Cyg_libm_ieee_float_shape_type *)&__x)->asi32) +#define CYG_LIBM_FLp(__x) (((Cyg_libm_ieee_float_shape_type *)__x)->asi32) + // REPLACEMENTS FOR STUFF FROM MATH.H DUE TO CONFIG OPTION #ifdef CYGSYM_LIBM_NO_XOPEN_SVID_NAMESPACE_POLLUTION @@ -242,6 +245,70 @@ externC int __kernel_rem_pio2( double *, double *, int, int, int, const int * ); + +// IEEE-754 style elementary functions */ + +externC float +__ieee754_sqrtf( float ); + +externC float +__ieee754_acosf( float ); + + +externC float +__ieee754_logf( float ); + + +externC float +__ieee754_asinf( float ); + +externC float +__ieee754_atan2f( float, float ); + +externC float +__ieee754_expf( float ); + +externC float +__ieee754_coshf( float ); + +externC float +__ieee754_fmodf( float, float ); + +externC float +__ieee754_powf( float, float ); + + +externC float +__ieee754_log10f( float ); + +externC float +__ieee754_sinhf( float ); + + +externC int +__ieee754_rem_pio2f( float, float * ); + +#ifdef CYGFUN_LIBM_SVID3_scalb +externC float +__ieee754_scalbf( float, float ); +#else +externC float +__ieee754_scalbf( float, int ); +#endif + +// FDLIBM kernel functions + +externC float +__kernel_sinf( float, float, int ); + +externC float +__kernel_cosf( float, float ); + +externC float +__kernel_tanf( float, float, int ); + +externC int +__kernel_rem_pio2f( float *, float *, int, int, int, const int * ); #endif // ifdef CYGPKG_LIBM Index: language/c/libm/current/src/misc/standard.c =================================================================== RCS file: /cvs/ecos/ecos/packages/language/c/libm/current/src/misc/standard.c,v retrieving revision 1.4 diff -u -r1.4 standard.c --- standard.c 2000/02/02 19:57:33 1.4 +++ standard.c 2001/09/21 01:11:07 @@ -158,6 +158,8 @@ #endif exc.arg1 = x; exc.arg2 = y; + if (type > 100) + type -= 100; switch(type) { case 1: /* acos(|x|>1) */