Path: blob/main/system/lib/llvm-libc/include/llvm-libc-macros/math-macros.h
6172 views
//===-- Definition of macros from math.h ----------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIBC_MACROS_MATH_MACROS_H9#define LLVM_LIBC_MACROS_MATH_MACROS_H1011#include "limits-macros.h"1213#define FP_NAN 014#define FP_INFINITE 115#define FP_ZERO 216#define FP_SUBNORMAL 317#define FP_NORMAL 41819#define FP_INT_UPWARD 020#define FP_INT_DOWNWARD 121#define FP_INT_TOWARDZERO 222#define FP_INT_TONEARESTFROMZERO 323#define FP_INT_TONEAREST 42425#define MATH_ERRNO 126#define MATH_ERREXCEPT 22728#define HUGE_VAL __builtin_huge_val()29#define HUGE_VALF __builtin_huge_valf()30#define INFINITY __builtin_inff()31#define NAN __builtin_nanf("")3233#define FP_ILOGB0 (-INT_MAX - 1)34#define FP_LLOGB0 (-LONG_MAX - 1)3536#ifdef __FP_LOGBNAN_MIN37#define FP_ILOGBNAN (-INT_MAX - 1)38#define FP_LLOGBNAN (-LONG_MAX - 1)39#else40#define FP_ILOGBNAN INT_MAX41#define FP_LLOGBNAN LONG_MAX42#endif4344#if defined(__NVPTX__) || defined(__AMDGPU__) || defined(__FAST_MATH__)45#define math_errhandling 046#elif defined(__NO_MATH_ERRNO__)47#define math_errhandling (MATH_ERREXCEPT)48#else49#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)50#endif5152#endif // LLVM_LIBC_MACROS_MATH_MACROS_H535455