Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include <math.h>
  2. #include <errno.h>
  3.  
  4. double ldexp(double x, int expn)
  5. {
  6.   double res;
  7.   if (!isfinite (x) || x == 0.0L)
  8.     return x;
  9.  
  10.   __asm__ ("fscale"
  11.             : "=t" (res)
  12.         : "0" (x), "u" ((double) expn));
  13.  
  14.  // if (!isfinite (res) || res == 0.0L)
  15.  //   errno = ERANGE;
  16.  
  17.   return res;
  18. }
  19.  
  20.