home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / gnuc / gnulib / rcs / fixsfsi.c,v < prev    next >
Encoding:
Text File  |  1992-07-04  |  588 b   |  49 lines

  1. head    1.1;
  2. access;
  3. symbols
  4.     version39-41:1.1;
  5. locks;
  6. comment    @ * @;
  7.  
  8.  
  9. 1.1
  10. date    92.06.08.19.47.59;    author mwild;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @initial checkin
  17. @
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @#include "common.h"
  26. #ifdef IEEE_SINGBAS
  27. #include <inline/mathieeesingbas.h>
  28. #else
  29. #include <inline/mathffp.h>
  30. #include <inline/mathtrans.h>
  31. #endif
  32.  
  33. SItype
  34. __fixsfsi (a)
  35.      FLOAT a;
  36. {
  37. #ifdef IEEE_SINGBAS
  38.   return IEEESPFix(a);
  39. #else
  40. #if 1
  41.   return SPFix( SPFieee(a));
  42. #else
  43.   /* don't know.. */
  44.   return SPFix( SPAdd (SPFieee(a), SPFieee( *(long *)(float[]){0.5}) ));
  45. #endif
  46. #endif
  47. }
  48. @
  49.