#63704 - keldon - Thu Dec 15, 2005 6:30 pm
Code: |
inline int fpdiv ( int a, int b ) {
int bs = ( b < 0 ? -1 : 1 ); b *= bs; long long lb; lb = 1; lb = lb << 63; lb = lb / ((long long) b ); b = (int) (lb >> 31); return fpmul (a, b * bs ); } |
Is there a more accurate way to perform fixed point division?