Changeset 349


Ignore:
Timestamp:
09/23/07 19:12:08 (17 years ago)
Author:
r2d
Message:

corrected error with optimized gcc builds and CVD_FASTLOG defined

Location:
libmpc/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/include/mpc/mpcmath.h

    r333 r349  
    2424        mpc_int32_t n;
    2525} mpc_floatint;
     26
     27typedef union mpc_doubleint
     28{
     29        double   d;
     30        mpc_int32_t n[2];
     31} mpc_doubleint;
    2632
    2733static mpc_inline mpc_int32_t mpc_lrintf(float fVal)
  • libmpc/trunk/libmpcpsy/cvd.c

    r340 r349  
    227227logfast ( float x )
    228228{
    229     double  y = x * x;
    230     y *= y;
    231     y *= y;
    232     return (((int*)(&y))[1] + (45127.5 - 1072693248.)) * ( M_LN2 / (1L<<23) );
     229        mpc_doubleint y;
     230        y.d = x * x;
     231    y.d *= y.d;
     232    y.d *= y.d;
     233        return (y.n[1] + (45127.5 - 1072693248.)) * ( M_LN2 / (1L<<23) );
    233234}
    234235
Note: See TracChangeset for help on using the changeset viewer.