home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / SDL / gcc346 / !gcc / include / unixlib / h / fenv < prev    next >
Encoding:
Text File  |  2006-09-17  |  2.3 KB  |  77 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/fenv.h,v $
  4.  * $Date: 2004/10/17 16:24:43 $
  5.  * $Revision: 1.5 $
  6.  * $State: Exp $
  7.  * $Author: joty $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. #ifndef _FENV_H
  12. #define _FENV_H 1
  13.  
  14. #ifndef __UNIXLIB_FEATURES_H
  15. #include <features.h>
  16. #endif
  17.  
  18. #include <bits/fenv.h>
  19. #include <fpu_control.h>
  20.  
  21. __BEGIN_DECLS
  22.  
  23. /* Floating-point exception handling.  */
  24.  
  25. /* Clear the supported exceptions represented by EXCEPTS.  */
  26. extern int feclearexcept (int __excepts) __THROW;
  27.  
  28. /* Store implementation-defined representation of the exception flags
  29.    indicated by EXCEPTS in the object pointed to by FLAGP.  */
  30. extern void fegetexceptflag (fexcept_t *__flagp, int __excepts) __THROW;
  31.  
  32. /* Raise the supported exceptions represented by EXCEPTS.  */
  33. extern int feraiseexcept (int __excepts) __THROW;
  34.  
  35. /* Set complete status for exceptions indicated by EXCEPTS according to
  36.    the representation in the object pointed to by FLAGP.  */
  37. extern int fesetexceptflag (const fexcept_t *__flagp, int __excepts)
  38.      __THROW;
  39.  
  40. /* Determine which of subset of the exceptions specified by EXCEPTS are
  41.    currently set.  */
  42. extern int fetestexcept (int __excepts) __THROW;
  43.  
  44.  
  45. /* Rounding control.  */
  46.  
  47. /* Get current rounding direction.  */
  48. extern int fegetround (void) __THROW;
  49.  
  50. /* Establish the rounding direction represented by ROUND.  */
  51. extern int fesetround (int __rounding_direction) __THROW;
  52.  
  53.  
  54. /* Floating-point environment.  */
  55.  
  56. /* Store the current floating-point environment in the object pointed
  57.    to by ENVP.  */
  58. extern int fegetenv (fenv_t *__envp) __THROW;
  59.  
  60. /* Save the current environment in the object pointed to by ENVP, clear
  61.    exception flags and install a non-stop mode (if available) for all
  62.    exceptions.  */
  63. extern int feholdexcept (fenv_t *__envp) __THROW;
  64.  
  65. /* Establish the floating-point environment represented by the object
  66.    pointed to by ENVP.  */
  67. extern int fesetenv (const fenv_t *__envp) __THROW;
  68.  
  69. /* Save current exceptions in temporary storage, install environment
  70.    represented by object pointed to by ENVP and raise exceptions
  71.    according to saved exceptions.  */
  72. extern void feupdateenv (const fenv_t *__envp) __THROW;
  73.  
  74. __END_DECLS
  75.  
  76. #endif
  77.