cfloat 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_CFLOAT
  10. #define _LIBCPP_CFLOAT
  11. /*
  12. cfloat synopsis
  13. Macros:
  14. FLT_ROUNDS
  15. FLT_EVAL_METHOD // C99
  16. FLT_RADIX
  17. FLT_HAS_SUBNORM // C11
  18. DBL_HAS_SUBNORM // C11
  19. LDBL_HAS_SUBNORM // C11
  20. FLT_MANT_DIG
  21. DBL_MANT_DIG
  22. LDBL_MANT_DIG
  23. DECIMAL_DIG // C99
  24. FLT_DECIMAL_DIG // C11
  25. DBL_DECIMAL_DIG // C11
  26. LDBL_DECIMAL_DIG // C11
  27. FLT_DIG
  28. DBL_DIG
  29. LDBL_DIG
  30. FLT_MIN_EXP
  31. DBL_MIN_EXP
  32. LDBL_MIN_EXP
  33. FLT_MIN_10_EXP
  34. DBL_MIN_10_EXP
  35. LDBL_MIN_10_EXP
  36. FLT_MAX_EXP
  37. DBL_MAX_EXP
  38. LDBL_MAX_EXP
  39. FLT_MAX_10_EXP
  40. DBL_MAX_10_EXP
  41. LDBL_MAX_10_EXP
  42. FLT_MAX
  43. DBL_MAX
  44. LDBL_MAX
  45. FLT_EPSILON
  46. DBL_EPSILON
  47. LDBL_EPSILON
  48. FLT_MIN
  49. DBL_MIN
  50. LDBL_MIN
  51. FLT_TRUE_MIN // C11
  52. DBL_TRUE_MIN // C11
  53. LDBL_TRUE_MIN // C11
  54. */
  55. #include <__assert> // all public C++ headers provide the assertion handler
  56. #include <__config>
  57. #include <float.h>
  58. #ifndef _LIBCPP_FLOAT_H
  59. # error <cfloat> tried including <float.h> but didn't find libc++'s <float.h> header. \
  60. This usually means that your header search paths are not configured properly. \
  61. The header search paths should contain the C++ Standard Library headers before \
  62. any C Standard Library, and you are probably using compiler flags that make that \
  63. not be the case.
  64. #endif
  65. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  66. # pragma GCC system_header
  67. #endif
  68. #endif // _LIBCPP_CFLOAT