Branch: Tag:

1997-10-19

1997-10-19 22:13:33 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

encode_value now works on negative floats

Rev: src/encode.c:1.14
Rev: src/testsuite.in:1.60

31:   #ifdef HAVE_FREXP   #define FREXP frexp   #else - double frexp(double x, int *exp) - { -  double ret; -  *exp=(int)ceil(log(x)/log(2.0)); -  ret=(x*pow(2.0,(float)-*exp)); -  return ret; - } - #endif -  - #ifdef HAVE_FREXP - #define FREXP frexp - #else +    double FREXP(double x, int *exp)   {    double ret; -  *exp=(int)ceil(log(x)/log(2.0)); +  *exp=(int)ceil(log(fabs(x))/log(2.0));    ret=(x*pow(2.0,(float)-*exp));    return ret;   }