You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Copyright (c) 2017 SiFive Inc. All rights reserved.
  2. This copyrighted material is made available to anyone wishing to use,
  3. modify, copy, or redistribute it subject to the terms and conditions
  4. of the FreeBSD License. This program is distributed in the hope that
  5. it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
  6. including the implied warranties of MERCHANTABILITY or FITNESS FOR
  7. A PARTICULAR PURPOSE. A copy of this license is available at
  8. http://www.opensource.org/licenses.
  9. */
  10. #ifndef _FENV_H
  11. #define _FENV_H
  12. #include <sys/fenv.h>
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /* Exception */
  17. int feclearexcept(int excepts);
  18. int fegetexceptflag(fexcept_t *flagp, int excepts);
  19. int feraiseexcept(int excepts);
  20. int fesetexceptflag(const fexcept_t *flagp, int excepts);
  21. int fetestexcept(int excepts);
  22. /* Rounding mode */
  23. int fegetround(void);
  24. int fesetround(int rounding_mode);
  25. /* Float environment */
  26. int fegetenv(fenv_t *envp);
  27. int feholdexcept(fenv_t *envp);
  28. int fesetenv(const fenv_t *envp);
  29. int feupdateenv(const fenv_t *envp);
  30. #ifdef __cplusplus
  31. }
  32. #endif
  33. #endif