[clang][dataflow] Replace one remaining call to deprecated `addToFlowCondition()...
[llvm-project.git] / libc / include / llvm-libc-macros / math-macros.h
blob136670e665e6b0691c3e2b9eeb7d940a8ba9eb01
1 //===-- Definition of macros from math.h ----------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef __LLVM_LIBC_MACROS_MATH_MACROS_H
10 #define __LLVM_LIBC_MACROS_MATH_MACROS_H
12 #define MATH_ERRNO 1
13 #define MATH_ERREXCEPT 2
15 #define HUGE_VAL __builtin_huge_val()
16 #define INFINITY __builtin_inf()
17 #define NAN __builtin_nanf("")
19 #define FP_ILOGB0 (-__INT_MAX__ - 1)
20 #define FP_ILOGBNAN __INT_MAX__
22 #define isfinite(x) __builtin_isfinite(x)
23 #define isinf(x) __builtin_isinf(x)
24 #define isnan(x) __builtin_isnan(x)
26 #ifdef __FAST_MATH__
27 #define math_errhandling 0
28 #elif defined __NO_MATH_ERRNO__
29 #define math_errhandling (MATH_ERREXCEPT)
30 #else
31 #define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
32 #endif
34 #endif // __LLVM_LIBC_MACROS_MATH_MACROS_H