long-double.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* Properties of long double type.
  2. Copyright (C) 2016-2026 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <https://www.gnu.org/licenses/>. */
  15. /* This header is included by <sys/cdefs.h>.
  16. If long double is ABI-compatible with double, it should define
  17. __NO_LONG_DOUBLE_MATH to 1; otherwise, it should leave
  18. __NO_LONG_DOUBLE_MATH undefined.
  19. If this build of the GNU C Library supports both long double
  20. ABI-compatible with double and some other long double format not
  21. ABI-compatible with double, it should define
  22. __LONG_DOUBLE_MATH_OPTIONAL to 1; otherwise, it should leave
  23. __LONG_DOUBLE_MATH_OPTIONAL undefined.
  24. If __NO_LONG_DOUBLE_MATH is already defined, this header must not
  25. define anything; this is needed to work with the definition of
  26. __NO_LONG_DOUBLE_MATH in nldbl-compat.h. */
  27. /* In the default version of this header, long double is
  28. ABI-compatible with double. */
  29. #ifndef __NO_LONG_DOUBLE_MATH
  30. # define __NO_LONG_DOUBLE_MATH 1
  31. #endif
  32. /* The macro __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI is used to determine the
  33. choice of the underlying ABI of long double. It will always assume
  34. a constant value for each translation unit.
  35. If the value is non-zero, any API which is parameterized by the long
  36. double type (i.e the scanf/printf family of functions or the explicitly
  37. parameterized math.h functions) will be redirected to a compatible
  38. implementation using _Float128 ABI via symbols suffixed with ieee128.
  39. The mechanism this macro uses to acquire may be a function
  40. of architecture, or target specific options used to invoke the
  41. compiler. */
  42. #define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0