home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / pc_hw / fpu / cntrl87.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  1.5 KB  |  41 lines

  1. @c ----------------------------------------------------------------------
  2. @node _control87, cpu
  3. @subheading Syntax
  4.  
  5. @example
  6. #include <float.h>
  7.  
  8. unsigned int _control87(unsigned int newcw, unsigned int mask);
  9. @end example
  10.  
  11. @subheading Description
  12.  
  13. Sets or resets bits in the FPU's control register.  The bits are
  14. defined by macros in float.h, and by this table:
  15.  
  16. @example
  17. ---- ---- --XX XXXX = MCW_EM - exception masks (1=handle exception internally, 0=fault)
  18. ---- ---- ---- ---X = EM_INVALID - invalid operation
  19. ---- ---- ---- --X- = EM_DENORMAL - denormal operand
  20. ---- ---- ---- -X-- = EM_ZERODIVIDE - divide by zero
  21. ---- ---- ---- X--- = EM_OVERFLOW - overflow
  22. ---- ---- ---X ---- = EM_UNDERFLOW - underflow
  23. ---- ---- --X- ---- = EM_INEXACT - rounding was required
  24. ---- --XX ---- ---- = MCW_PC - precision control
  25. ---- --00 ---- ---- = PC_24 - single precision
  26. ---- --10 ---- ---- = PC_53 - double precision
  27. ---- --11 ---- ---- = PC_64 - extended precision
  28. ---- XX-- ---- ---- = MCW_RC - rounding control
  29. ---- 00-- ---- ---- = RC_NEAR - round to nearest
  30. ---- 01-- ---- ---- = RC_DOWN - round towards -Inf
  31. ---- 10-- ---- ---- = RC_UP - round towards +Inf
  32. ---- 11-- ---- ---- = RC_CHOP - round towards zero
  33. ---X ---- ---- ---- = MCW_IC - infinity control (obsolete, always affine)
  34. ---0 ---- ---- ---- = IC_AFFINE - -Inf < +Inf
  35. ---1 ---- ---- ---- = IC_PROJECTIVE - -Inf == +Inf
  36. @end example
  37.  
  38. @subheading Return Value
  39.  
  40. The previous control word.
  41.