• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
10#ifndef _LIBCPP_CFLOAT
11#define _LIBCPP_CFLOAT
12
13/*
14    cfloat synopsis
15
16Macros:
17
18    FLT_ROUNDS
19    FLT_EVAL_METHOD     // C99
20    FLT_RADIX
21
22    FLT_HAS_SUBNORM     // C11
23    DBL_HAS_SUBNORM     // C11
24    LDBL_HAS_SUBNORM    // C11
25
26    FLT_MANT_DIG
27    DBL_MANT_DIG
28    LDBL_MANT_DIG
29
30    DECIMAL_DIG         // C99
31    FLT_DECIMAL_DIG     // C11
32    DBL_DECIMAL_DIG     // C11
33    LDBL_DECIMAL_DIG    // C11
34
35    FLT_DIG
36    DBL_DIG
37    LDBL_DIG
38
39    FLT_MIN_EXP
40    DBL_MIN_EXP
41    LDBL_MIN_EXP
42
43    FLT_MIN_10_EXP
44    DBL_MIN_10_EXP
45    LDBL_MIN_10_EXP
46
47    FLT_MAX_EXP
48    DBL_MAX_EXP
49    LDBL_MAX_EXP
50
51    FLT_MAX_10_EXP
52    DBL_MAX_10_EXP
53    LDBL_MAX_10_EXP
54
55    FLT_MAX
56    DBL_MAX
57    LDBL_MAX
58
59    FLT_EPSILON
60    DBL_EPSILON
61    LDBL_EPSILON
62
63    FLT_MIN
64    DBL_MIN
65    LDBL_MIN
66
67    FLT_TRUE_MIN        // C11
68    DBL_TRUE_MIN        // C11
69    LDBL_TRUE_MIN       // C11
70*/
71
72#include <__assert> // all public C++ headers provide the assertion handler
73#include <__config>
74
75#include <float.h>
76
77#ifndef _LIBCPP_FLOAT_H
78#   error <cfloat> tried including <float.h> but didn't find libc++'s <float.h> header. \
79          This usually means that your header search paths are not configured properly. \
80          The header search paths should contain the C++ Standard Library headers before \
81          any C Standard Library, and you are probably using compiler flags that make that \
82          not be the case.
83#endif
84
85#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
86#  pragma GCC system_header
87#endif
88
89#endif // _LIBCPP_CFLOAT
90