1
0

mathcalls-helper-functions.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //
  2. // Copyright 2026 Aarav Ravindra Kharade
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. /* Prototype declarations for math classification macros helpers.
  17. Copyright (C) 2017-2026 Free Software Foundation, Inc.
  18. This file is part of the GNU C Library.
  19. The GNU C Library is free software; you can redistribute it and/or
  20. modify it under the terms of the GNU Lesser General Public
  21. License as published by the Free Software Foundation; either
  22. version 2.1 of the License, or (at your option) any later version.
  23. The GNU C Library is distributed in the hope that it will be useful,
  24. but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  26. Lesser General Public License for more details.
  27. You should have received a copy of the GNU Lesser General Public
  28. License along with the GNU C Library; if not, see
  29. <https://www.gnu.org/licenses/>. */
  30. /* Classify given number. */
  31. __MATHDECL_ALIAS (int, __fpclassify,, (_Mdouble_ __value), fpclassify)
  32. __attribute__ ((__const__));
  33. /* Test for negative number. */
  34. __MATHDECL_ALIAS (int, __signbit,, (_Mdouble_ __value), signbit)
  35. __attribute__ ((__const__));
  36. /* Return 0 if VALUE is finite or NaN, +1 if it
  37. is +Infinity, -1 if it is -Infinity. */
  38. __MATHDECL_ALIAS (int, __isinf,, (_Mdouble_ __value), isinf)
  39. __attribute__ ((__const__));
  40. /* Return nonzero if VALUE is finite and not NaN. Used by isfinite macro. */
  41. __MATHDECL_ALIAS (int, __finite,, (_Mdouble_ __value), finite)
  42. __attribute__ ((__const__));
  43. /* Return nonzero if VALUE is not a number. */
  44. __MATHDECL_ALIAS (int, __isnan,, (_Mdouble_ __value), isnan)
  45. __attribute__ ((__const__));
  46. /* Test equality. */
  47. __MATHDECL_ALIAS (int, __iseqsig,, (_Mdouble_ __x, _Mdouble_ __y), iseqsig);
  48. /* Test for signaling NaN. */
  49. __MATHDECL_ALIAS (int, __issignaling,, (_Mdouble_ __value), issignaling)
  50. __attribute__ ((__const__));