llvm/libc/include/llvm-libc-macros/math-macros.h

//===-- Definition of macros from math.h ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIBC_MACROS_MATH_MACROS_H
#define LLVM_LIBC_MACROS_MATH_MACROS_H

#include "limits-macros.h"

#define FP_NAN
#define FP_INFINITE
#define FP_ZERO
#define FP_SUBNORMAL
#define FP_NORMAL

#define FP_INT_UPWARD
#define FP_INT_DOWNWARD
#define FP_INT_TOWARDZERO
#define FP_INT_TONEARESTFROMZERO
#define FP_INT_TONEAREST

#define MATH_ERRNO
#define MATH_ERREXCEPT

#define HUGE_VAL
#define HUGE_VALF
#define INFINITY
#define NAN

#define FP_ILOGB0
#define FP_LLOGB0

#ifdef __FP_LOGBNAN_MIN
#define FP_ILOGBNAN
#define FP_LLOGBNAN
#else
#define FP_ILOGBNAN
#define FP_LLOGBNAN
#endif

#if defined(__NVPTX__) || defined(__AMDGPU__) || defined(__FAST_MATH__)
#define math_errhandling
#elif defined(__NO_MATH_ERRNO__)
#define math_errhandling
#else
#define math_errhandling
#endif

#endif // LLVM_LIBC_MACROS_MATH_MACROS_H