math.in.h 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395
  1. /* A GNU-like <math.h>.
  2. Copyright (C) 2002-2003, 2007-2017 Free Software Foundation, Inc.
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  13. #ifndef _@GUARD_PREFIX@_MATH_H
  14. #if __GNUC__ >= 3
  15. @PRAGMA_SYSTEM_HEADER@
  16. #endif
  17. @PRAGMA_COLUMNS@
  18. /* The include_next requires a split double-inclusion guard. */
  19. #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
  20. #ifndef _@GUARD_PREFIX@_MATH_H
  21. #define _@GUARD_PREFIX@_MATH_H
  22. #ifndef _GL_INLINE_HEADER_BEGIN
  23. #error "Please include config.h first."
  24. #endif
  25. _GL_INLINE_HEADER_BEGIN
  26. #ifndef _GL_MATH_INLINE
  27. # define _GL_MATH_INLINE _GL_INLINE
  28. #endif
  29. /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
  30. /* The definition of _GL_ARG_NONNULL is copied here. */
  31. /* The definition of _GL_WARN_ON_USE is copied here. */
  32. #ifdef __cplusplus
  33. /* Helper macros to define type-generic function FUNC as overloaded functions,
  34. rather than as macros like in C. POSIX declares these with an argument of
  35. real-floating (that is, one of float, double, or long double). */
  36. # define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
  37. static inline int \
  38. _gl_cxx_ ## func ## f (float f) \
  39. { \
  40. return func (f); \
  41. } \
  42. static inline int \
  43. _gl_cxx_ ## func ## d (double d) \
  44. { \
  45. return func (d); \
  46. } \
  47. static inline int \
  48. _gl_cxx_ ## func ## l (long double l) \
  49. { \
  50. return func (l); \
  51. }
  52. # define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
  53. _GL_BEGIN_NAMESPACE \
  54. inline int \
  55. func (float f) \
  56. { \
  57. return _gl_cxx_ ## func ## f (f); \
  58. } \
  59. inline int \
  60. func (double d) \
  61. { \
  62. return _gl_cxx_ ## func ## d (d); \
  63. } \
  64. inline int \
  65. func (long double l) \
  66. { \
  67. return _gl_cxx_ ## func ## l (l); \
  68. } \
  69. _GL_END_NAMESPACE
  70. #endif
  71. /* Helper macros to define a portability warning for the
  72. classification macro FUNC called with VALUE. POSIX declares the
  73. classification macros with an argument of real-floating (that is,
  74. one of float, double, or long double). */
  75. #define _GL_WARN_REAL_FLOATING_DECL(func) \
  76. _GL_MATH_INLINE int \
  77. rpl_ ## func ## f (float f) \
  78. { \
  79. return func (f); \
  80. } \
  81. _GL_MATH_INLINE int \
  82. rpl_ ## func ## d (double d) \
  83. { \
  84. return func (d); \
  85. } \
  86. _GL_MATH_INLINE int \
  87. rpl_ ## func ## l (long double l) \
  88. { \
  89. return func (l); \
  90. } \
  91. _GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \
  92. "use gnulib module " #func " for portability"); \
  93. _GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \
  94. "use gnulib module " #func " for portability"); \
  95. _GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
  96. "use gnulib module " #func " for portability")
  97. #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
  98. (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
  99. : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
  100. : rpl_ ## func ## l (value))
  101. #if @REPLACE_ITOLD@
  102. /* Pull in a function that fixes the 'int' to 'long double' conversion
  103. of glibc 2.7. */
  104. _GL_EXTERN_C void _Qp_itoq (long double *, int);
  105. static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
  106. #endif
  107. /* POSIX allows platforms that don't support NAN. But all major
  108. machines in the past 15 years have supported something close to
  109. IEEE NaN, so we define this unconditionally. We also must define
  110. it on platforms like Solaris 10, where NAN is present but defined
  111. as a function pointer rather than a floating point constant. */
  112. #if !defined NAN || @REPLACE_NAN@
  113. # if !GNULIB_defined_NAN
  114. # undef NAN
  115. /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
  116. choke on the expression 0.0 / 0.0. */
  117. # if defined __DECC || defined _MSC_VER
  118. _GL_MATH_INLINE float
  119. _NaN ()
  120. {
  121. static float zero = 0.0f;
  122. return zero / zero;
  123. }
  124. # define NAN (_NaN())
  125. # else
  126. # define NAN (0.0f / 0.0f)
  127. # endif
  128. # define GNULIB_defined_NAN 1
  129. # endif
  130. #endif
  131. /* Solaris 10 defines HUGE_VAL, but as a function pointer rather
  132. than a floating point constant. */
  133. #if @REPLACE_HUGE_VAL@
  134. # undef HUGE_VALF
  135. # define HUGE_VALF (1.0f / 0.0f)
  136. # undef HUGE_VAL
  137. # define HUGE_VAL (1.0 / 0.0)
  138. # undef HUGE_VALL
  139. # define HUGE_VALL (1.0L / 0.0L)
  140. #endif
  141. /* HUGE_VALF is a 'float' Infinity. */
  142. #ifndef HUGE_VALF
  143. # if defined _MSC_VER
  144. /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
  145. # define HUGE_VALF (1e25f * 1e25f)
  146. # else
  147. # define HUGE_VALF (1.0f / 0.0f)
  148. # endif
  149. #endif
  150. /* HUGE_VAL is a 'double' Infinity. */
  151. #ifndef HUGE_VAL
  152. # if defined _MSC_VER
  153. /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
  154. # define HUGE_VAL (1e250 * 1e250)
  155. # else
  156. # define HUGE_VAL (1.0 / 0.0)
  157. # endif
  158. #endif
  159. /* HUGE_VALL is a 'long double' Infinity. */
  160. #ifndef HUGE_VALL
  161. # if defined _MSC_VER
  162. /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
  163. # define HUGE_VALL (1e250L * 1e250L)
  164. # else
  165. # define HUGE_VALL (1.0L / 0.0L)
  166. # endif
  167. #endif
  168. /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
  169. #if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
  170. # if defined __NetBSD__ || defined __sgi
  171. /* NetBSD, IRIX 6.5: match what ilogb() does */
  172. # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
  173. # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
  174. # elif defined _AIX
  175. /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
  176. # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
  177. # define FP_ILOGBNAN 2147483647 /* INT_MAX */
  178. # elif defined __sun
  179. /* Solaris 9: match what ilogb() does */
  180. # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
  181. # define FP_ILOGBNAN 2147483647 /* INT_MAX */
  182. # else
  183. /* Gnulib defined values. */
  184. # define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
  185. # define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
  186. # endif
  187. #endif
  188. #if @GNULIB_ACOSF@
  189. # if @REPLACE_ACOSF@
  190. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  191. # undef acosf
  192. # define acosf rpl_acosf
  193. # endif
  194. _GL_FUNCDECL_RPL (acosf, float, (float x));
  195. _GL_CXXALIAS_RPL (acosf, float, (float x));
  196. # else
  197. # if !@HAVE_ACOSF@
  198. # undef acosf
  199. _GL_FUNCDECL_SYS (acosf, float, (float x));
  200. # endif
  201. _GL_CXXALIAS_SYS (acosf, float, (float x));
  202. # endif
  203. _GL_CXXALIASWARN (acosf);
  204. #elif defined GNULIB_POSIXCHECK
  205. # undef acosf
  206. # if HAVE_RAW_DECL_ACOSF
  207. _GL_WARN_ON_USE (acosf, "acosf is unportable - "
  208. "use gnulib module acosf for portability");
  209. # endif
  210. #endif
  211. #if @GNULIB_ACOSL@
  212. # if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
  213. # undef acosl
  214. _GL_FUNCDECL_SYS (acosl, long double, (long double x));
  215. # endif
  216. _GL_CXXALIAS_SYS (acosl, long double, (long double x));
  217. _GL_CXXALIASWARN (acosl);
  218. #elif defined GNULIB_POSIXCHECK
  219. # undef acosl
  220. # if HAVE_RAW_DECL_ACOSL
  221. _GL_WARN_ON_USE (acosl, "acosl is unportable - "
  222. "use gnulib module acosl for portability");
  223. # endif
  224. #endif
  225. #if @GNULIB_ASINF@
  226. # if @REPLACE_ASINF@
  227. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  228. # undef asinf
  229. # define asinf rpl_asinf
  230. # endif
  231. _GL_FUNCDECL_RPL (asinf, float, (float x));
  232. _GL_CXXALIAS_RPL (asinf, float, (float x));
  233. # else
  234. # if !@HAVE_ASINF@
  235. # undef asinf
  236. _GL_FUNCDECL_SYS (asinf, float, (float x));
  237. # endif
  238. _GL_CXXALIAS_SYS (asinf, float, (float x));
  239. # endif
  240. _GL_CXXALIASWARN (asinf);
  241. #elif defined GNULIB_POSIXCHECK
  242. # undef asinf
  243. # if HAVE_RAW_DECL_ASINF
  244. _GL_WARN_ON_USE (asinf, "asinf is unportable - "
  245. "use gnulib module asinf for portability");
  246. # endif
  247. #endif
  248. #if @GNULIB_ASINL@
  249. # if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
  250. # undef asinl
  251. _GL_FUNCDECL_SYS (asinl, long double, (long double x));
  252. # endif
  253. _GL_CXXALIAS_SYS (asinl, long double, (long double x));
  254. _GL_CXXALIASWARN (asinl);
  255. #elif defined GNULIB_POSIXCHECK
  256. # undef asinl
  257. # if HAVE_RAW_DECL_ASINL
  258. _GL_WARN_ON_USE (asinl, "asinl is unportable - "
  259. "use gnulib module asinl for portability");
  260. # endif
  261. #endif
  262. #if @GNULIB_ATANF@
  263. # if @REPLACE_ATANF@
  264. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  265. # undef atanf
  266. # define atanf rpl_atanf
  267. # endif
  268. _GL_FUNCDECL_RPL (atanf, float, (float x));
  269. _GL_CXXALIAS_RPL (atanf, float, (float x));
  270. # else
  271. # if !@HAVE_ATANF@
  272. # undef atanf
  273. _GL_FUNCDECL_SYS (atanf, float, (float x));
  274. # endif
  275. _GL_CXXALIAS_SYS (atanf, float, (float x));
  276. # endif
  277. _GL_CXXALIASWARN (atanf);
  278. #elif defined GNULIB_POSIXCHECK
  279. # undef atanf
  280. # if HAVE_RAW_DECL_ATANF
  281. _GL_WARN_ON_USE (atanf, "atanf is unportable - "
  282. "use gnulib module atanf for portability");
  283. # endif
  284. #endif
  285. #if @GNULIB_ATANL@
  286. # if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
  287. # undef atanl
  288. _GL_FUNCDECL_SYS (atanl, long double, (long double x));
  289. # endif
  290. _GL_CXXALIAS_SYS (atanl, long double, (long double x));
  291. _GL_CXXALIASWARN (atanl);
  292. #elif defined GNULIB_POSIXCHECK
  293. # undef atanl
  294. # if HAVE_RAW_DECL_ATANL
  295. _GL_WARN_ON_USE (atanl, "atanl is unportable - "
  296. "use gnulib module atanl for portability");
  297. # endif
  298. #endif
  299. #if @GNULIB_ATAN2F@
  300. # if @REPLACE_ATAN2F@
  301. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  302. # undef atan2f
  303. # define atan2f rpl_atan2f
  304. # endif
  305. _GL_FUNCDECL_RPL (atan2f, float, (float y, float x));
  306. _GL_CXXALIAS_RPL (atan2f, float, (float y, float x));
  307. # else
  308. # if !@HAVE_ATAN2F@
  309. # undef atan2f
  310. _GL_FUNCDECL_SYS (atan2f, float, (float y, float x));
  311. # endif
  312. _GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
  313. # endif
  314. _GL_CXXALIASWARN (atan2f);
  315. #elif defined GNULIB_POSIXCHECK
  316. # undef atan2f
  317. # if HAVE_RAW_DECL_ATAN2F
  318. _GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
  319. "use gnulib module atan2f for portability");
  320. # endif
  321. #endif
  322. #if @GNULIB_CBRTF@
  323. # if @REPLACE_CBRTF@
  324. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  325. # undef cbrtf
  326. # define cbrtf rpl_cbrtf
  327. # endif
  328. _GL_FUNCDECL_RPL (cbrtf, float, (float x));
  329. _GL_CXXALIAS_RPL (cbrtf, float, (float x));
  330. # else
  331. # if !@HAVE_DECL_CBRTF@
  332. _GL_FUNCDECL_SYS (cbrtf, float, (float x));
  333. # endif
  334. _GL_CXXALIAS_SYS (cbrtf, float, (float x));
  335. # endif
  336. _GL_CXXALIASWARN (cbrtf);
  337. #elif defined GNULIB_POSIXCHECK
  338. # undef cbrtf
  339. # if HAVE_RAW_DECL_CBRTF
  340. _GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
  341. "use gnulib module cbrtf for portability");
  342. # endif
  343. #endif
  344. #if @GNULIB_CBRT@
  345. # if !@HAVE_CBRT@
  346. _GL_FUNCDECL_SYS (cbrt, double, (double x));
  347. # endif
  348. _GL_CXXALIAS_SYS (cbrt, double, (double x));
  349. _GL_CXXALIASWARN (cbrt);
  350. #elif defined GNULIB_POSIXCHECK
  351. # undef cbrt
  352. # if HAVE_RAW_DECL_CBRT
  353. _GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
  354. "use gnulib module cbrt for portability");
  355. # endif
  356. #endif
  357. #if @GNULIB_CBRTL@
  358. # if @REPLACE_CBRTL@
  359. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  360. # undef cbrtl
  361. # define cbrtl rpl_cbrtl
  362. # endif
  363. _GL_FUNCDECL_RPL (cbrtl, long double, (long double x));
  364. _GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
  365. # else
  366. # if !@HAVE_DECL_CBRTL@
  367. _GL_FUNCDECL_SYS (cbrtl, long double, (long double x));
  368. # endif
  369. _GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
  370. # endif
  371. _GL_CXXALIASWARN (cbrtl);
  372. #elif defined GNULIB_POSIXCHECK
  373. # undef cbrtl
  374. # if HAVE_RAW_DECL_CBRTL
  375. _GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
  376. "use gnulib module cbrtl for portability");
  377. # endif
  378. #endif
  379. #if @GNULIB_CEILF@
  380. # if @REPLACE_CEILF@
  381. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  382. # undef ceilf
  383. # define ceilf rpl_ceilf
  384. # endif
  385. _GL_FUNCDECL_RPL (ceilf, float, (float x));
  386. _GL_CXXALIAS_RPL (ceilf, float, (float x));
  387. # else
  388. # if !@HAVE_DECL_CEILF@
  389. # undef ceilf
  390. _GL_FUNCDECL_SYS (ceilf, float, (float x));
  391. # endif
  392. _GL_CXXALIAS_SYS (ceilf, float, (float x));
  393. # endif
  394. _GL_CXXALIASWARN (ceilf);
  395. #elif defined GNULIB_POSIXCHECK
  396. # undef ceilf
  397. # if HAVE_RAW_DECL_CEILF
  398. _GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
  399. "use gnulib module ceilf for portability");
  400. # endif
  401. #endif
  402. #if @GNULIB_CEIL@
  403. # if @REPLACE_CEIL@
  404. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  405. # undef ceil
  406. # define ceil rpl_ceil
  407. # endif
  408. _GL_FUNCDECL_RPL (ceil, double, (double x));
  409. _GL_CXXALIAS_RPL (ceil, double, (double x));
  410. # else
  411. _GL_CXXALIAS_SYS (ceil, double, (double x));
  412. # endif
  413. _GL_CXXALIASWARN (ceil);
  414. #endif
  415. #if @GNULIB_CEILL@
  416. # if @REPLACE_CEILL@
  417. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  418. # undef ceill
  419. # define ceill rpl_ceill
  420. # endif
  421. _GL_FUNCDECL_RPL (ceill, long double, (long double x));
  422. _GL_CXXALIAS_RPL (ceill, long double, (long double x));
  423. # else
  424. # if !@HAVE_DECL_CEILL@
  425. # undef ceill
  426. _GL_FUNCDECL_SYS (ceill, long double, (long double x));
  427. # endif
  428. _GL_CXXALIAS_SYS (ceill, long double, (long double x));
  429. # endif
  430. _GL_CXXALIASWARN (ceill);
  431. #elif defined GNULIB_POSIXCHECK
  432. # undef ceill
  433. # if HAVE_RAW_DECL_CEILL
  434. _GL_WARN_ON_USE (ceill, "ceill is unportable - "
  435. "use gnulib module ceill for portability");
  436. # endif
  437. #endif
  438. #if @GNULIB_COPYSIGNF@
  439. # if !@HAVE_DECL_COPYSIGNF@
  440. _GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
  441. # endif
  442. _GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
  443. _GL_CXXALIASWARN (copysignf);
  444. #elif defined GNULIB_POSIXCHECK
  445. # undef copysignf
  446. # if HAVE_RAW_DECL_COPYSIGNF
  447. _GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
  448. "use gnulib module copysignf for portability");
  449. # endif
  450. #endif
  451. #if @GNULIB_COPYSIGN@
  452. # if !@HAVE_COPYSIGN@
  453. _GL_FUNCDECL_SYS (copysign, double, (double x, double y));
  454. # endif
  455. _GL_CXXALIAS_SYS (copysign, double, (double x, double y));
  456. _GL_CXXALIASWARN (copysign);
  457. #elif defined GNULIB_POSIXCHECK
  458. # undef copysign
  459. # if HAVE_RAW_DECL_COPYSIGN
  460. _GL_WARN_ON_USE (copysign, "copysign is unportable - "
  461. "use gnulib module copysign for portability");
  462. # endif
  463. #endif
  464. #if @GNULIB_COPYSIGNL@
  465. # if !@HAVE_COPYSIGNL@
  466. _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y));
  467. # endif
  468. _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y));
  469. _GL_CXXALIASWARN (copysignl);
  470. #elif defined GNULIB_POSIXCHECK
  471. # undef copysignl
  472. # if HAVE_RAW_DECL_COPYSIGNL
  473. _GL_WARN_ON_USE (copysign, "copysignl is unportable - "
  474. "use gnulib module copysignl for portability");
  475. # endif
  476. #endif
  477. #if @GNULIB_COSF@
  478. # if @REPLACE_COSF@
  479. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  480. # undef cosf
  481. # define cosf rpl_cosf
  482. # endif
  483. _GL_FUNCDECL_RPL (cosf, float, (float x));
  484. _GL_CXXALIAS_RPL (cosf, float, (float x));
  485. # else
  486. # if !@HAVE_COSF@
  487. # undef cosf
  488. _GL_FUNCDECL_SYS (cosf, float, (float x));
  489. # endif
  490. _GL_CXXALIAS_SYS (cosf, float, (float x));
  491. # endif
  492. _GL_CXXALIASWARN (cosf);
  493. #elif defined GNULIB_POSIXCHECK
  494. # undef cosf
  495. # if HAVE_RAW_DECL_COSF
  496. _GL_WARN_ON_USE (cosf, "cosf is unportable - "
  497. "use gnulib module cosf for portability");
  498. # endif
  499. #endif
  500. #if @GNULIB_COSL@
  501. # if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
  502. # undef cosl
  503. _GL_FUNCDECL_SYS (cosl, long double, (long double x));
  504. # endif
  505. _GL_CXXALIAS_SYS (cosl, long double, (long double x));
  506. _GL_CXXALIASWARN (cosl);
  507. #elif defined GNULIB_POSIXCHECK
  508. # undef cosl
  509. # if HAVE_RAW_DECL_COSL
  510. _GL_WARN_ON_USE (cosl, "cosl is unportable - "
  511. "use gnulib module cosl for portability");
  512. # endif
  513. #endif
  514. #if @GNULIB_COSHF@
  515. # if @REPLACE_COSHF@
  516. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  517. # undef coshf
  518. # define coshf rpl_coshf
  519. # endif
  520. _GL_FUNCDECL_RPL (coshf, float, (float x));
  521. _GL_CXXALIAS_RPL (coshf, float, (float x));
  522. # else
  523. # if !@HAVE_COSHF@
  524. # undef coshf
  525. _GL_FUNCDECL_SYS (coshf, float, (float x));
  526. # endif
  527. _GL_CXXALIAS_SYS (coshf, float, (float x));
  528. # endif
  529. _GL_CXXALIASWARN (coshf);
  530. #elif defined GNULIB_POSIXCHECK
  531. # undef coshf
  532. # if HAVE_RAW_DECL_COSHF
  533. _GL_WARN_ON_USE (coshf, "coshf is unportable - "
  534. "use gnulib module coshf for portability");
  535. # endif
  536. #endif
  537. #if @GNULIB_EXPF@
  538. # if @REPLACE_EXPF@
  539. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  540. # undef expf
  541. # define expf rpl_expf
  542. # endif
  543. _GL_FUNCDECL_RPL (expf, float, (float x));
  544. _GL_CXXALIAS_RPL (expf, float, (float x));
  545. # else
  546. # if !@HAVE_EXPF@
  547. # undef expf
  548. _GL_FUNCDECL_SYS (expf, float, (float x));
  549. # endif
  550. _GL_CXXALIAS_SYS (expf, float, (float x));
  551. # endif
  552. _GL_CXXALIASWARN (expf);
  553. #elif defined GNULIB_POSIXCHECK
  554. # undef expf
  555. # if HAVE_RAW_DECL_EXPF
  556. _GL_WARN_ON_USE (expf, "expf is unportable - "
  557. "use gnulib module expf for portability");
  558. # endif
  559. #endif
  560. #if @GNULIB_EXPL@
  561. # if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
  562. # undef expl
  563. _GL_FUNCDECL_SYS (expl, long double, (long double x));
  564. # endif
  565. _GL_CXXALIAS_SYS (expl, long double, (long double x));
  566. _GL_CXXALIASWARN (expl);
  567. #elif defined GNULIB_POSIXCHECK
  568. # undef expl
  569. # if HAVE_RAW_DECL_EXPL
  570. _GL_WARN_ON_USE (expl, "expl is unportable - "
  571. "use gnulib module expl for portability");
  572. # endif
  573. #endif
  574. #if @GNULIB_EXP2F@
  575. # if !@HAVE_DECL_EXP2F@
  576. _GL_FUNCDECL_SYS (exp2f, float, (float x));
  577. # endif
  578. _GL_CXXALIAS_SYS (exp2f, float, (float x));
  579. _GL_CXXALIASWARN (exp2f);
  580. #elif defined GNULIB_POSIXCHECK
  581. # undef exp2f
  582. # if HAVE_RAW_DECL_EXP2F
  583. _GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
  584. "use gnulib module exp2f for portability");
  585. # endif
  586. #endif
  587. #if @GNULIB_EXP2@
  588. # if @REPLACE_EXP2@
  589. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  590. # undef exp2
  591. # define exp2 rpl_exp2
  592. # endif
  593. _GL_FUNCDECL_RPL (exp2, double, (double x));
  594. _GL_CXXALIAS_RPL (exp2, double, (double x));
  595. # else
  596. # if !@HAVE_DECL_EXP2@
  597. _GL_FUNCDECL_SYS (exp2, double, (double x));
  598. # endif
  599. _GL_CXXALIAS_SYS (exp2, double, (double x));
  600. # endif
  601. _GL_CXXALIASWARN (exp2);
  602. #elif defined GNULIB_POSIXCHECK
  603. # undef exp2
  604. # if HAVE_RAW_DECL_EXP2
  605. _GL_WARN_ON_USE (exp2, "exp2 is unportable - "
  606. "use gnulib module exp2 for portability");
  607. # endif
  608. #endif
  609. #if @GNULIB_EXP2L@
  610. # if @REPLACE_EXP2L@
  611. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  612. # undef exp2l
  613. # define exp2l rpl_exp2l
  614. # endif
  615. _GL_FUNCDECL_RPL (exp2l, long double, (long double x));
  616. _GL_CXXALIAS_RPL (exp2l, long double, (long double x));
  617. # else
  618. # if !@HAVE_DECL_EXP2L@
  619. # undef exp2l
  620. _GL_FUNCDECL_SYS (exp2l, long double, (long double x));
  621. # endif
  622. _GL_CXXALIAS_SYS (exp2l, long double, (long double x));
  623. # endif
  624. _GL_CXXALIASWARN (exp2l);
  625. #elif defined GNULIB_POSIXCHECK
  626. # undef exp2l
  627. # if HAVE_RAW_DECL_EXP2L
  628. _GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
  629. "use gnulib module exp2l for portability");
  630. # endif
  631. #endif
  632. #if @GNULIB_EXPM1F@
  633. # if @REPLACE_EXPM1F@
  634. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  635. # undef expm1f
  636. # define expm1f rpl_expm1f
  637. # endif
  638. _GL_FUNCDECL_RPL (expm1f, float, (float x));
  639. _GL_CXXALIAS_RPL (expm1f, float, (float x));
  640. # else
  641. # if !@HAVE_EXPM1F@
  642. _GL_FUNCDECL_SYS (expm1f, float, (float x));
  643. # endif
  644. _GL_CXXALIAS_SYS (expm1f, float, (float x));
  645. # endif
  646. _GL_CXXALIASWARN (expm1f);
  647. #elif defined GNULIB_POSIXCHECK
  648. # undef expm1f
  649. # if HAVE_RAW_DECL_EXPM1F
  650. _GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
  651. "use gnulib module expm1f for portability");
  652. # endif
  653. #endif
  654. #if @GNULIB_EXPM1@
  655. # if @REPLACE_EXPM1@
  656. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  657. # undef expm1
  658. # define expm1 rpl_expm1
  659. # endif
  660. _GL_FUNCDECL_RPL (expm1, double, (double x));
  661. _GL_CXXALIAS_RPL (expm1, double, (double x));
  662. # else
  663. # if !@HAVE_EXPM1@
  664. _GL_FUNCDECL_SYS (expm1, double, (double x));
  665. # endif
  666. _GL_CXXALIAS_SYS (expm1, double, (double x));
  667. # endif
  668. _GL_CXXALIASWARN (expm1);
  669. #elif defined GNULIB_POSIXCHECK
  670. # undef expm1
  671. # if HAVE_RAW_DECL_EXPM1
  672. _GL_WARN_ON_USE (expm1, "expm1 is unportable - "
  673. "use gnulib module expm1 for portability");
  674. # endif
  675. #endif
  676. #if @GNULIB_EXPM1L@
  677. # if !@HAVE_DECL_EXPM1L@
  678. # undef expm1l
  679. _GL_FUNCDECL_SYS (expm1l, long double, (long double x));
  680. # endif
  681. _GL_CXXALIAS_SYS (expm1l, long double, (long double x));
  682. _GL_CXXALIASWARN (expm1l);
  683. #elif defined GNULIB_POSIXCHECK
  684. # undef expm1l
  685. # if HAVE_RAW_DECL_EXPM1L
  686. _GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
  687. "use gnulib module expm1l for portability");
  688. # endif
  689. #endif
  690. #if @GNULIB_FABSF@
  691. # if !@HAVE_FABSF@
  692. # undef fabsf
  693. _GL_FUNCDECL_SYS (fabsf, float, (float x));
  694. # endif
  695. _GL_CXXALIAS_SYS (fabsf, float, (float x));
  696. _GL_CXXALIASWARN (fabsf);
  697. #elif defined GNULIB_POSIXCHECK
  698. # undef fabsf
  699. # if HAVE_RAW_DECL_FABSF
  700. _GL_WARN_ON_USE (fabsf, "fabsf is unportable - "
  701. "use gnulib module fabsf for portability");
  702. # endif
  703. #endif
  704. #if @GNULIB_FABSL@
  705. # if @REPLACE_FABSL@
  706. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  707. # undef fabsl
  708. # define fabsl rpl_fabsl
  709. # endif
  710. _GL_FUNCDECL_RPL (fabsl, long double, (long double x));
  711. _GL_CXXALIAS_RPL (fabsl, long double, (long double x));
  712. # else
  713. # if !@HAVE_FABSL@
  714. # undef fabsl
  715. _GL_FUNCDECL_SYS (fabsl, long double, (long double x));
  716. # endif
  717. _GL_CXXALIAS_SYS (fabsl, long double, (long double x));
  718. # endif
  719. _GL_CXXALIASWARN (fabsl);
  720. #elif defined GNULIB_POSIXCHECK
  721. # undef fabsl
  722. # if HAVE_RAW_DECL_FABSL
  723. _GL_WARN_ON_USE (fabsl, "fabsl is unportable - "
  724. "use gnulib module fabsl for portability");
  725. # endif
  726. #endif
  727. #if @GNULIB_FLOORF@
  728. # if @REPLACE_FLOORF@
  729. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  730. # undef floorf
  731. # define floorf rpl_floorf
  732. # endif
  733. _GL_FUNCDECL_RPL (floorf, float, (float x));
  734. _GL_CXXALIAS_RPL (floorf, float, (float x));
  735. # else
  736. # if !@HAVE_DECL_FLOORF@
  737. # undef floorf
  738. _GL_FUNCDECL_SYS (floorf, float, (float x));
  739. # endif
  740. _GL_CXXALIAS_SYS (floorf, float, (float x));
  741. # endif
  742. _GL_CXXALIASWARN (floorf);
  743. #elif defined GNULIB_POSIXCHECK
  744. # undef floorf
  745. # if HAVE_RAW_DECL_FLOORF
  746. _GL_WARN_ON_USE (floorf, "floorf is unportable - "
  747. "use gnulib module floorf for portability");
  748. # endif
  749. #endif
  750. #if @GNULIB_FLOOR@
  751. # if @REPLACE_FLOOR@
  752. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  753. # undef floor
  754. # define floor rpl_floor
  755. # endif
  756. _GL_FUNCDECL_RPL (floor, double, (double x));
  757. _GL_CXXALIAS_RPL (floor, double, (double x));
  758. # else
  759. _GL_CXXALIAS_SYS (floor, double, (double x));
  760. # endif
  761. _GL_CXXALIASWARN (floor);
  762. #endif
  763. #if @GNULIB_FLOORL@
  764. # if @REPLACE_FLOORL@
  765. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  766. # undef floorl
  767. # define floorl rpl_floorl
  768. # endif
  769. _GL_FUNCDECL_RPL (floorl, long double, (long double x));
  770. _GL_CXXALIAS_RPL (floorl, long double, (long double x));
  771. # else
  772. # if !@HAVE_DECL_FLOORL@
  773. # undef floorl
  774. _GL_FUNCDECL_SYS (floorl, long double, (long double x));
  775. # endif
  776. _GL_CXXALIAS_SYS (floorl, long double, (long double x));
  777. # endif
  778. _GL_CXXALIASWARN (floorl);
  779. #elif defined GNULIB_POSIXCHECK
  780. # undef floorl
  781. # if HAVE_RAW_DECL_FLOORL
  782. _GL_WARN_ON_USE (floorl, "floorl is unportable - "
  783. "use gnulib module floorl for portability");
  784. # endif
  785. #endif
  786. #if @GNULIB_FMAF@
  787. # if @REPLACE_FMAF@
  788. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  789. # undef fmaf
  790. # define fmaf rpl_fmaf
  791. # endif
  792. _GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z));
  793. _GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z));
  794. # else
  795. # if !@HAVE_FMAF@
  796. _GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z));
  797. # endif
  798. _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z));
  799. # endif
  800. _GL_CXXALIASWARN (fmaf);
  801. #elif defined GNULIB_POSIXCHECK
  802. # undef fmaf
  803. # if HAVE_RAW_DECL_FMAF
  804. _GL_WARN_ON_USE (fmaf, "fmaf is unportable - "
  805. "use gnulib module fmaf for portability");
  806. # endif
  807. #endif
  808. #if @GNULIB_FMA@
  809. # if @REPLACE_FMA@
  810. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  811. # undef fma
  812. # define fma rpl_fma
  813. # endif
  814. _GL_FUNCDECL_RPL (fma, double, (double x, double y, double z));
  815. _GL_CXXALIAS_RPL (fma, double, (double x, double y, double z));
  816. # else
  817. # if !@HAVE_FMA@
  818. _GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
  819. # endif
  820. _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
  821. # endif
  822. _GL_CXXALIASWARN (fma);
  823. #elif defined GNULIB_POSIXCHECK
  824. # undef fma
  825. # if HAVE_RAW_DECL_FMA
  826. _GL_WARN_ON_USE (fma, "fma is unportable - "
  827. "use gnulib module fma for portability");
  828. # endif
  829. #endif
  830. #if @GNULIB_FMAL@
  831. # if @REPLACE_FMAL@
  832. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  833. # undef fmal
  834. # define fmal rpl_fmal
  835. # endif
  836. _GL_FUNCDECL_RPL (fmal, long double,
  837. (long double x, long double y, long double z));
  838. _GL_CXXALIAS_RPL (fmal, long double,
  839. (long double x, long double y, long double z));
  840. # else
  841. # if !@HAVE_FMAL@
  842. # undef fmal
  843. _GL_FUNCDECL_SYS (fmal, long double,
  844. (long double x, long double y, long double z));
  845. # endif
  846. _GL_CXXALIAS_SYS (fmal, long double,
  847. (long double x, long double y, long double z));
  848. # endif
  849. _GL_CXXALIASWARN (fmal);
  850. #elif defined GNULIB_POSIXCHECK
  851. # undef fmal
  852. # if HAVE_RAW_DECL_FMAL
  853. _GL_WARN_ON_USE (fmal, "fmal is unportable - "
  854. "use gnulib module fmal for portability");
  855. # endif
  856. #endif
  857. #if @GNULIB_FMODF@
  858. # if @REPLACE_FMODF@
  859. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  860. # undef fmodf
  861. # define fmodf rpl_fmodf
  862. # endif
  863. _GL_FUNCDECL_RPL (fmodf, float, (float x, float y));
  864. _GL_CXXALIAS_RPL (fmodf, float, (float x, float y));
  865. # else
  866. # if !@HAVE_FMODF@
  867. # undef fmodf
  868. _GL_FUNCDECL_SYS (fmodf, float, (float x, float y));
  869. # endif
  870. _GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
  871. # endif
  872. _GL_CXXALIASWARN (fmodf);
  873. #elif defined GNULIB_POSIXCHECK
  874. # undef fmodf
  875. # if HAVE_RAW_DECL_FMODF
  876. _GL_WARN_ON_USE (fmodf, "fmodf is unportable - "
  877. "use gnulib module fmodf for portability");
  878. # endif
  879. #endif
  880. #if @GNULIB_FMOD@
  881. # if @REPLACE_FMOD@
  882. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  883. # undef fmod
  884. # define fmod rpl_fmod
  885. # endif
  886. _GL_FUNCDECL_RPL (fmod, double, (double x, double y));
  887. _GL_CXXALIAS_RPL (fmod, double, (double x, double y));
  888. # else
  889. _GL_CXXALIAS_SYS (fmod, double, (double x, double y));
  890. # endif
  891. _GL_CXXALIASWARN (fmod);
  892. #elif defined GNULIB_POSIXCHECK
  893. # undef fmod
  894. # if HAVE_RAW_DECL_FMOD
  895. _GL_WARN_ON_USE (fmod, "fmod has portability problems - "
  896. "use gnulib module fmod for portability");
  897. # endif
  898. #endif
  899. #if @GNULIB_FMODL@
  900. # if @REPLACE_FMODL@
  901. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  902. # undef fmodl
  903. # define fmodl rpl_fmodl
  904. # endif
  905. _GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y));
  906. _GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y));
  907. # else
  908. # if !@HAVE_FMODL@
  909. # undef fmodl
  910. _GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
  911. # endif
  912. _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
  913. # endif
  914. _GL_CXXALIASWARN (fmodl);
  915. #elif defined GNULIB_POSIXCHECK
  916. # undef fmodl
  917. # if HAVE_RAW_DECL_FMODL
  918. _GL_WARN_ON_USE (fmodl, "fmodl is unportable - "
  919. "use gnulib module fmodl for portability");
  920. # endif
  921. #endif
  922. /* Write x as
  923. x = mantissa * 2^exp
  924. where
  925. If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
  926. If x is zero: mantissa = x, exp = 0.
  927. If x is infinite or NaN: mantissa = x, exp unspecified.
  928. Store exp in *EXPPTR and return mantissa. */
  929. #if @GNULIB_FREXPF@
  930. # if @REPLACE_FREXPF@
  931. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  932. # undef frexpf
  933. # define frexpf rpl_frexpf
  934. # endif
  935. _GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
  936. _GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr));
  937. # else
  938. # if !@HAVE_FREXPF@
  939. # undef frexpf
  940. _GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
  941. # endif
  942. _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
  943. # endif
  944. _GL_CXXALIASWARN (frexpf);
  945. #elif defined GNULIB_POSIXCHECK
  946. # undef frexpf
  947. # if HAVE_RAW_DECL_FREXPF
  948. _GL_WARN_ON_USE (frexpf, "frexpf is unportable - "
  949. "use gnulib module frexpf for portability");
  950. # endif
  951. #endif
  952. /* Write x as
  953. x = mantissa * 2^exp
  954. where
  955. If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
  956. If x is zero: mantissa = x, exp = 0.
  957. If x is infinite or NaN: mantissa = x, exp unspecified.
  958. Store exp in *EXPPTR and return mantissa. */
  959. #if @GNULIB_FREXP@
  960. # if @REPLACE_FREXP@
  961. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  962. # undef frexp
  963. # define frexp rpl_frexp
  964. # endif
  965. _GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
  966. _GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
  967. # else
  968. _GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
  969. # endif
  970. _GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
  971. #elif defined GNULIB_POSIXCHECK
  972. # undef frexp
  973. /* Assume frexp is always declared. */
  974. _GL_WARN_ON_USE (frexp, "frexp is unportable - "
  975. "use gnulib module frexp for portability");
  976. #endif
  977. /* Write x as
  978. x = mantissa * 2^exp
  979. where
  980. If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
  981. If x is zero: mantissa = x, exp = 0.
  982. If x is infinite or NaN: mantissa = x, exp unspecified.
  983. Store exp in *EXPPTR and return mantissa. */
  984. #if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
  985. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  986. # undef frexpl
  987. # define frexpl rpl_frexpl
  988. # endif
  989. _GL_FUNCDECL_RPL (frexpl, long double,
  990. (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
  991. _GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr));
  992. #else
  993. # if !@HAVE_DECL_FREXPL@
  994. _GL_FUNCDECL_SYS (frexpl, long double,
  995. (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
  996. # endif
  997. # if @GNULIB_FREXPL@
  998. _GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
  999. # endif
  1000. #endif
  1001. #if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
  1002. _GL_CXXALIASWARN (frexpl);
  1003. #endif
  1004. #if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
  1005. # undef frexpl
  1006. # if HAVE_RAW_DECL_FREXPL
  1007. _GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
  1008. "use gnulib module frexpl for portability");
  1009. # endif
  1010. #endif
  1011. /* Return sqrt(x^2+y^2). */
  1012. #if @GNULIB_HYPOTF@
  1013. # if @REPLACE_HYPOTF@
  1014. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1015. # undef hypotf
  1016. # define hypotf rpl_hypotf
  1017. # endif
  1018. _GL_FUNCDECL_RPL (hypotf, float, (float x, float y));
  1019. _GL_CXXALIAS_RPL (hypotf, float, (float x, float y));
  1020. # else
  1021. # if !@HAVE_HYPOTF@
  1022. _GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
  1023. # endif
  1024. _GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
  1025. # endif
  1026. _GL_CXXALIASWARN (hypotf);
  1027. #elif defined GNULIB_POSIXCHECK
  1028. # undef hypotf
  1029. # if HAVE_RAW_DECL_HYPOTF
  1030. _GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
  1031. "use gnulib module hypotf for portability");
  1032. # endif
  1033. #endif
  1034. /* Return sqrt(x^2+y^2). */
  1035. #if @GNULIB_HYPOT@
  1036. # if @REPLACE_HYPOT@
  1037. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1038. # undef hypot
  1039. # define hypot rpl_hypot
  1040. # endif
  1041. _GL_FUNCDECL_RPL (hypot, double, (double x, double y));
  1042. _GL_CXXALIAS_RPL (hypot, double, (double x, double y));
  1043. # else
  1044. _GL_CXXALIAS_SYS (hypot, double, (double x, double y));
  1045. # endif
  1046. _GL_CXXALIASWARN (hypot);
  1047. #elif defined GNULIB_POSIXCHECK
  1048. # undef hypot
  1049. # if HAVE_RAW_DECL_HYPOT
  1050. _GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
  1051. "use gnulib module hypot for portability");
  1052. # endif
  1053. #endif
  1054. /* Return sqrt(x^2+y^2). */
  1055. #if @GNULIB_HYPOTL@
  1056. # if @REPLACE_HYPOTL@
  1057. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1058. # undef hypotl
  1059. # define hypotl rpl_hypotl
  1060. # endif
  1061. _GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y));
  1062. _GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y));
  1063. # else
  1064. # if !@HAVE_HYPOTL@
  1065. _GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
  1066. # endif
  1067. _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
  1068. # endif
  1069. _GL_CXXALIASWARN (hypotl);
  1070. #elif defined GNULIB_POSIXCHECK
  1071. # undef hypotl
  1072. # if HAVE_RAW_DECL_HYPOTL
  1073. _GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
  1074. "use gnulib module hypotl for portability");
  1075. # endif
  1076. #endif
  1077. #if @GNULIB_ILOGBF@
  1078. # if @REPLACE_ILOGBF@
  1079. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1080. # undef ilogbf
  1081. # define ilogbf rpl_ilogbf
  1082. # endif
  1083. _GL_FUNCDECL_RPL (ilogbf, int, (float x));
  1084. _GL_CXXALIAS_RPL (ilogbf, int, (float x));
  1085. # else
  1086. # if !@HAVE_ILOGBF@
  1087. _GL_FUNCDECL_SYS (ilogbf, int, (float x));
  1088. # endif
  1089. _GL_CXXALIAS_SYS (ilogbf, int, (float x));
  1090. # endif
  1091. _GL_CXXALIASWARN (ilogbf);
  1092. #elif defined GNULIB_POSIXCHECK
  1093. # undef ilogbf
  1094. # if HAVE_RAW_DECL_ILOGBF
  1095. _GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - "
  1096. "use gnulib module ilogbf for portability");
  1097. # endif
  1098. #endif
  1099. #if @GNULIB_ILOGB@
  1100. # if @REPLACE_ILOGB@
  1101. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1102. # undef ilogb
  1103. # define ilogb rpl_ilogb
  1104. # endif
  1105. _GL_FUNCDECL_RPL (ilogb, int, (double x));
  1106. _GL_CXXALIAS_RPL (ilogb, int, (double x));
  1107. # else
  1108. # if !@HAVE_ILOGB@
  1109. _GL_FUNCDECL_SYS (ilogb, int, (double x));
  1110. # endif
  1111. _GL_CXXALIAS_SYS (ilogb, int, (double x));
  1112. # endif
  1113. _GL_CXXALIASWARN (ilogb);
  1114. #elif defined GNULIB_POSIXCHECK
  1115. # undef ilogb
  1116. # if HAVE_RAW_DECL_ILOGB
  1117. _GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
  1118. "use gnulib module ilogb for portability");
  1119. # endif
  1120. #endif
  1121. #if @GNULIB_ILOGBL@
  1122. # if !@HAVE_ILOGBL@
  1123. _GL_FUNCDECL_SYS (ilogbl, int, (long double x));
  1124. # endif
  1125. _GL_CXXALIAS_SYS (ilogbl, int, (long double x));
  1126. _GL_CXXALIASWARN (ilogbl);
  1127. #elif defined GNULIB_POSIXCHECK
  1128. # undef ilogbl
  1129. # if HAVE_RAW_DECL_ILOGBL
  1130. _GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
  1131. "use gnulib module ilogbl for portability");
  1132. # endif
  1133. #endif
  1134. /* Return x * 2^exp. */
  1135. #if @GNULIB_LDEXPF@
  1136. # if !@HAVE_LDEXPF@
  1137. # undef ldexpf
  1138. _GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp));
  1139. # endif
  1140. _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
  1141. _GL_CXXALIASWARN (ldexpf);
  1142. #elif defined GNULIB_POSIXCHECK
  1143. # undef ldexpf
  1144. # if HAVE_RAW_DECL_LDEXPF
  1145. _GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - "
  1146. "use gnulib module ldexpf for portability");
  1147. # endif
  1148. #endif
  1149. /* Return x * 2^exp. */
  1150. #if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
  1151. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1152. # undef ldexpl
  1153. # define ldexpl rpl_ldexpl
  1154. # endif
  1155. _GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp));
  1156. _GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp));
  1157. #else
  1158. # if !@HAVE_DECL_LDEXPL@
  1159. _GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp));
  1160. # endif
  1161. # if @GNULIB_LDEXPL@
  1162. _GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
  1163. # endif
  1164. #endif
  1165. #if @GNULIB_LDEXPL@
  1166. _GL_CXXALIASWARN (ldexpl);
  1167. #endif
  1168. #if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
  1169. # undef ldexpl
  1170. # if HAVE_RAW_DECL_LDEXPL
  1171. _GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
  1172. "use gnulib module ldexpl for portability");
  1173. # endif
  1174. #endif
  1175. #if @GNULIB_LOGF@
  1176. # if @REPLACE_LOGF@
  1177. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1178. # undef logf
  1179. # define logf rpl_logf
  1180. # endif
  1181. _GL_FUNCDECL_RPL (logf, float, (float x));
  1182. _GL_CXXALIAS_RPL (logf, float, (float x));
  1183. # else
  1184. # if !@HAVE_LOGF@
  1185. # undef logf
  1186. _GL_FUNCDECL_SYS (logf, float, (float x));
  1187. # endif
  1188. _GL_CXXALIAS_SYS (logf, float, (float x));
  1189. # endif
  1190. _GL_CXXALIASWARN (logf);
  1191. #elif defined GNULIB_POSIXCHECK
  1192. # undef logf
  1193. # if HAVE_RAW_DECL_LOGF
  1194. _GL_WARN_ON_USE (logf, "logf is unportable - "
  1195. "use gnulib module logf for portability");
  1196. # endif
  1197. #endif
  1198. #if @GNULIB_LOG@
  1199. # if @REPLACE_LOG@
  1200. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1201. # undef log
  1202. # define log rpl_log
  1203. # endif
  1204. _GL_FUNCDECL_RPL (log, double, (double x));
  1205. _GL_CXXALIAS_RPL (log, double, (double x));
  1206. # else
  1207. _GL_CXXALIAS_SYS (log, double, (double x));
  1208. # endif
  1209. _GL_CXXALIASWARN (log);
  1210. #elif defined GNULIB_POSIXCHECK
  1211. # undef log
  1212. # if HAVE_RAW_DECL_LOG
  1213. _GL_WARN_ON_USE (log, "log has portability problems - "
  1214. "use gnulib module log for portability");
  1215. # endif
  1216. #endif
  1217. #if @GNULIB_LOGL@
  1218. # if @REPLACE_LOGL@
  1219. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1220. # undef logl
  1221. # define logl rpl_logl
  1222. # endif
  1223. _GL_FUNCDECL_RPL (logl, long double, (long double x));
  1224. _GL_CXXALIAS_RPL (logl, long double, (long double x));
  1225. # else
  1226. # if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
  1227. # undef logl
  1228. _GL_FUNCDECL_SYS (logl, long double, (long double x));
  1229. # endif
  1230. _GL_CXXALIAS_SYS (logl, long double, (long double x));
  1231. # endif
  1232. _GL_CXXALIASWARN (logl);
  1233. #elif defined GNULIB_POSIXCHECK
  1234. # undef logl
  1235. # if HAVE_RAW_DECL_LOGL
  1236. _GL_WARN_ON_USE (logl, "logl is unportable - "
  1237. "use gnulib module logl for portability");
  1238. # endif
  1239. #endif
  1240. #if @GNULIB_LOG10F@
  1241. # if @REPLACE_LOG10F@
  1242. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1243. # undef log10f
  1244. # define log10f rpl_log10f
  1245. # endif
  1246. _GL_FUNCDECL_RPL (log10f, float, (float x));
  1247. _GL_CXXALIAS_RPL (log10f, float, (float x));
  1248. # else
  1249. # if !@HAVE_LOG10F@
  1250. # undef log10f
  1251. _GL_FUNCDECL_SYS (log10f, float, (float x));
  1252. # endif
  1253. _GL_CXXALIAS_SYS (log10f, float, (float x));
  1254. # endif
  1255. _GL_CXXALIASWARN (log10f);
  1256. #elif defined GNULIB_POSIXCHECK
  1257. # undef log10f
  1258. # if HAVE_RAW_DECL_LOG10F
  1259. _GL_WARN_ON_USE (log10f, "log10f is unportable - "
  1260. "use gnulib module log10f for portability");
  1261. # endif
  1262. #endif
  1263. #if @GNULIB_LOG10@
  1264. # if @REPLACE_LOG10@
  1265. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1266. # undef log10
  1267. # define log10 rpl_log10
  1268. # endif
  1269. _GL_FUNCDECL_RPL (log10, double, (double x));
  1270. _GL_CXXALIAS_RPL (log10, double, (double x));
  1271. # else
  1272. _GL_CXXALIAS_SYS (log10, double, (double x));
  1273. # endif
  1274. _GL_CXXALIASWARN (log10);
  1275. #elif defined GNULIB_POSIXCHECK
  1276. # undef log10
  1277. # if HAVE_RAW_DECL_LOG10
  1278. _GL_WARN_ON_USE (log10, "log10 has portability problems - "
  1279. "use gnulib module log10 for portability");
  1280. # endif
  1281. #endif
  1282. #if @GNULIB_LOG10L@
  1283. # if @REPLACE_LOG10L@
  1284. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1285. # undef log10l
  1286. # define log10l rpl_log10l
  1287. # endif
  1288. _GL_FUNCDECL_RPL (log10l, long double, (long double x));
  1289. _GL_CXXALIAS_RPL (log10l, long double, (long double x));
  1290. # else
  1291. # if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
  1292. # undef log10l
  1293. _GL_FUNCDECL_SYS (log10l, long double, (long double x));
  1294. # endif
  1295. _GL_CXXALIAS_SYS (log10l, long double, (long double x));
  1296. # endif
  1297. _GL_CXXALIASWARN (log10l);
  1298. #elif defined GNULIB_POSIXCHECK
  1299. # undef log10l
  1300. # if HAVE_RAW_DECL_LOG10L
  1301. _GL_WARN_ON_USE (log10l, "log10l is unportable - "
  1302. "use gnulib module log10l for portability");
  1303. # endif
  1304. #endif
  1305. #if @GNULIB_LOG1PF@
  1306. # if @REPLACE_LOG1PF@
  1307. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1308. # undef log1pf
  1309. # define log1pf rpl_log1pf
  1310. # endif
  1311. _GL_FUNCDECL_RPL (log1pf, float, (float x));
  1312. _GL_CXXALIAS_RPL (log1pf, float, (float x));
  1313. # else
  1314. # if !@HAVE_LOG1PF@
  1315. _GL_FUNCDECL_SYS (log1pf, float, (float x));
  1316. # endif
  1317. _GL_CXXALIAS_SYS (log1pf, float, (float x));
  1318. # endif
  1319. _GL_CXXALIASWARN (log1pf);
  1320. #elif defined GNULIB_POSIXCHECK
  1321. # undef log1pf
  1322. # if HAVE_RAW_DECL_LOG1PF
  1323. _GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
  1324. "use gnulib module log1pf for portability");
  1325. # endif
  1326. #endif
  1327. #if @GNULIB_LOG1P@
  1328. # if @REPLACE_LOG1P@
  1329. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1330. # undef log1p
  1331. # define log1p rpl_log1p
  1332. # endif
  1333. _GL_FUNCDECL_RPL (log1p, double, (double x));
  1334. _GL_CXXALIAS_RPL (log1p, double, (double x));
  1335. # else
  1336. # if !@HAVE_LOG1P@
  1337. _GL_FUNCDECL_SYS (log1p, double, (double x));
  1338. # endif
  1339. _GL_CXXALIAS_SYS (log1p, double, (double x));
  1340. # endif
  1341. _GL_CXXALIASWARN (log1p);
  1342. #elif defined GNULIB_POSIXCHECK
  1343. # undef log1p
  1344. # if HAVE_RAW_DECL_LOG1P
  1345. _GL_WARN_ON_USE (log1p, "log1p has portability problems - "
  1346. "use gnulib module log1p for portability");
  1347. # endif
  1348. #endif
  1349. #if @GNULIB_LOG1PL@
  1350. # if @REPLACE_LOG1PL@
  1351. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1352. # undef log1pl
  1353. # define log1pl rpl_log1pl
  1354. # endif
  1355. _GL_FUNCDECL_RPL (log1pl, long double, (long double x));
  1356. _GL_CXXALIAS_RPL (log1pl, long double, (long double x));
  1357. # else
  1358. # if !@HAVE_LOG1PL@
  1359. _GL_FUNCDECL_SYS (log1pl, long double, (long double x));
  1360. # endif
  1361. _GL_CXXALIAS_SYS (log1pl, long double, (long double x));
  1362. # endif
  1363. _GL_CXXALIASWARN (log1pl);
  1364. #elif defined GNULIB_POSIXCHECK
  1365. # undef log1pl
  1366. # if HAVE_RAW_DECL_LOG1PL
  1367. _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
  1368. "use gnulib module log1pl for portability");
  1369. # endif
  1370. #endif
  1371. #if @GNULIB_LOG2F@
  1372. # if @REPLACE_LOG2F@
  1373. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1374. # undef log2f
  1375. # define log2f rpl_log2f
  1376. # endif
  1377. _GL_FUNCDECL_RPL (log2f, float, (float x));
  1378. _GL_CXXALIAS_RPL (log2f, float, (float x));
  1379. # else
  1380. # if !@HAVE_DECL_LOG2F@
  1381. # undef log2f
  1382. _GL_FUNCDECL_SYS (log2f, float, (float x));
  1383. # endif
  1384. _GL_CXXALIAS_SYS (log2f, float, (float x));
  1385. # endif
  1386. _GL_CXXALIASWARN (log2f);
  1387. #elif defined GNULIB_POSIXCHECK
  1388. # undef log2f
  1389. # if HAVE_RAW_DECL_LOG2F
  1390. _GL_WARN_ON_USE (log2f, "log2f is unportable - "
  1391. "use gnulib module log2f for portability");
  1392. # endif
  1393. #endif
  1394. #if @GNULIB_LOG2@
  1395. # if @REPLACE_LOG2@
  1396. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1397. # undef log2
  1398. # define log2 rpl_log2
  1399. # endif
  1400. _GL_FUNCDECL_RPL (log2, double, (double x));
  1401. _GL_CXXALIAS_RPL (log2, double, (double x));
  1402. # else
  1403. # if !@HAVE_DECL_LOG2@
  1404. # undef log2
  1405. _GL_FUNCDECL_SYS (log2, double, (double x));
  1406. # endif
  1407. _GL_CXXALIAS_SYS (log2, double, (double x));
  1408. # endif
  1409. _GL_CXXALIASWARN (log2);
  1410. #elif defined GNULIB_POSIXCHECK
  1411. # undef log2
  1412. # if HAVE_RAW_DECL_LOG2
  1413. _GL_WARN_ON_USE (log2, "log2 is unportable - "
  1414. "use gnulib module log2 for portability");
  1415. # endif
  1416. #endif
  1417. #if @GNULIB_LOG2L@
  1418. # if @REPLACE_LOG2L@
  1419. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1420. # undef log2l
  1421. # define log2l rpl_log2l
  1422. # endif
  1423. _GL_FUNCDECL_RPL (log2l, long double, (long double x));
  1424. _GL_CXXALIAS_RPL (log2l, long double, (long double x));
  1425. # else
  1426. # if !@HAVE_DECL_LOG2L@
  1427. _GL_FUNCDECL_SYS (log2l, long double, (long double x));
  1428. # endif
  1429. _GL_CXXALIAS_SYS (log2l, long double, (long double x));
  1430. # endif
  1431. _GL_CXXALIASWARN (log2l);
  1432. #elif defined GNULIB_POSIXCHECK
  1433. # undef log2l
  1434. # if HAVE_RAW_DECL_LOG2L
  1435. _GL_WARN_ON_USE (log2l, "log2l is unportable - "
  1436. "use gnulib module log2l for portability");
  1437. # endif
  1438. #endif
  1439. #if @GNULIB_LOGBF@
  1440. # if @REPLACE_LOGBF@
  1441. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1442. # undef logbf
  1443. # define logbf rpl_logbf
  1444. # endif
  1445. _GL_FUNCDECL_RPL (logbf, float, (float x));
  1446. _GL_CXXALIAS_RPL (logbf, float, (float x));
  1447. # else
  1448. # if !@HAVE_LOGBF@
  1449. _GL_FUNCDECL_SYS (logbf, float, (float x));
  1450. # endif
  1451. _GL_CXXALIAS_SYS (logbf, float, (float x));
  1452. # endif
  1453. _GL_CXXALIASWARN (logbf);
  1454. #elif defined GNULIB_POSIXCHECK
  1455. # undef logbf
  1456. # if HAVE_RAW_DECL_LOGBF
  1457. _GL_WARN_ON_USE (logbf, "logbf is unportable - "
  1458. "use gnulib module logbf for portability");
  1459. # endif
  1460. #endif
  1461. #if @GNULIB_LOGB@
  1462. # if @REPLACE_LOGB@
  1463. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1464. # undef logb
  1465. # define logb rpl_logb
  1466. # endif
  1467. _GL_FUNCDECL_RPL (logb, double, (double x));
  1468. _GL_CXXALIAS_RPL (logb, double, (double x));
  1469. # else
  1470. # if !@HAVE_DECL_LOGB@
  1471. _GL_FUNCDECL_SYS (logb, double, (double x));
  1472. # endif
  1473. _GL_CXXALIAS_SYS (logb, double, (double x));
  1474. # endif
  1475. _GL_CXXALIASWARN (logb);
  1476. #elif defined GNULIB_POSIXCHECK
  1477. # undef logb
  1478. # if HAVE_RAW_DECL_LOGB
  1479. _GL_WARN_ON_USE (logb, "logb is unportable - "
  1480. "use gnulib module logb for portability");
  1481. # endif
  1482. #endif
  1483. #if @GNULIB_LOGBL@
  1484. # if @REPLACE_LOGBL@
  1485. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1486. # undef logbl
  1487. # define logbl rpl_logbl
  1488. # endif
  1489. _GL_FUNCDECL_RPL (logbl, long double, (long double x));
  1490. _GL_CXXALIAS_RPL (logbl, long double, (long double x));
  1491. # else
  1492. # if !@HAVE_LOGBL@
  1493. _GL_FUNCDECL_SYS (logbl, long double, (long double x));
  1494. # endif
  1495. _GL_CXXALIAS_SYS (logbl, long double, (long double x));
  1496. # endif
  1497. _GL_CXXALIASWARN (logbl);
  1498. #elif defined GNULIB_POSIXCHECK
  1499. # undef logbl
  1500. # if HAVE_RAW_DECL_LOGBL
  1501. _GL_WARN_ON_USE (logbl, "logbl is unportable - "
  1502. "use gnulib module logbl for portability");
  1503. # endif
  1504. #endif
  1505. #if @GNULIB_MODFF@
  1506. # if @REPLACE_MODFF@
  1507. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1508. # undef modff
  1509. # define modff rpl_modff
  1510. # endif
  1511. _GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
  1512. _GL_CXXALIAS_RPL (modff, float, (float x, float *iptr));
  1513. # else
  1514. # if !@HAVE_MODFF@
  1515. # undef modff
  1516. _GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
  1517. # endif
  1518. _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
  1519. # endif
  1520. _GL_CXXALIASWARN (modff);
  1521. #elif defined GNULIB_POSIXCHECK
  1522. # undef modff
  1523. # if HAVE_RAW_DECL_MODFF
  1524. _GL_WARN_ON_USE (modff, "modff is unportable - "
  1525. "use gnulib module modff for portability");
  1526. # endif
  1527. #endif
  1528. #if @GNULIB_MODF@
  1529. # if @REPLACE_MODF@
  1530. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1531. # undef modf
  1532. # define modf rpl_modf
  1533. # endif
  1534. _GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2)));
  1535. _GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
  1536. # else
  1537. _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
  1538. # endif
  1539. _GL_CXXALIASWARN (modf);
  1540. #elif defined GNULIB_POSIXCHECK
  1541. # undef modf
  1542. # if HAVE_RAW_DECL_MODF
  1543. _GL_WARN_ON_USE (modf, "modf has portability problems - "
  1544. "use gnulib module modf for portability");
  1545. # endif
  1546. #endif
  1547. #if @GNULIB_MODFL@
  1548. # if @REPLACE_MODFL@
  1549. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1550. # undef modfl
  1551. # define modfl rpl_modfl
  1552. # endif
  1553. _GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr)
  1554. _GL_ARG_NONNULL ((2)));
  1555. _GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr));
  1556. # else
  1557. # if !@HAVE_MODFL@
  1558. # undef modfl
  1559. _GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
  1560. _GL_ARG_NONNULL ((2)));
  1561. # endif
  1562. _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
  1563. # endif
  1564. _GL_CXXALIASWARN (modfl);
  1565. #elif defined GNULIB_POSIXCHECK
  1566. # undef modfl
  1567. # if HAVE_RAW_DECL_MODFL
  1568. _GL_WARN_ON_USE (modfl, "modfl is unportable - "
  1569. "use gnulib module modfl for portability");
  1570. # endif
  1571. #endif
  1572. #if @GNULIB_POWF@
  1573. # if !@HAVE_POWF@
  1574. # undef powf
  1575. _GL_FUNCDECL_SYS (powf, float, (float x, float y));
  1576. # endif
  1577. _GL_CXXALIAS_SYS (powf, float, (float x, float y));
  1578. _GL_CXXALIASWARN (powf);
  1579. #elif defined GNULIB_POSIXCHECK
  1580. # undef powf
  1581. # if HAVE_RAW_DECL_POWF
  1582. _GL_WARN_ON_USE (powf, "powf is unportable - "
  1583. "use gnulib module powf for portability");
  1584. # endif
  1585. #endif
  1586. #if @GNULIB_REMAINDERF@
  1587. # if @REPLACE_REMAINDERF@
  1588. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1589. # undef remainderf
  1590. # define remainderf rpl_remainderf
  1591. # endif
  1592. _GL_FUNCDECL_RPL (remainderf, float, (float x, float y));
  1593. _GL_CXXALIAS_RPL (remainderf, float, (float x, float y));
  1594. # else
  1595. # if !@HAVE_REMAINDERF@
  1596. _GL_FUNCDECL_SYS (remainderf, float, (float x, float y));
  1597. # endif
  1598. _GL_CXXALIAS_SYS (remainderf, float, (float x, float y));
  1599. # endif
  1600. _GL_CXXALIASWARN (remainderf);
  1601. #elif defined GNULIB_POSIXCHECK
  1602. # undef remainderf
  1603. # if HAVE_RAW_DECL_REMAINDERF
  1604. _GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
  1605. "use gnulib module remainderf for portability");
  1606. # endif
  1607. #endif
  1608. #if @GNULIB_REMAINDER@
  1609. # if @REPLACE_REMAINDER@
  1610. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1611. # undef remainder
  1612. # define remainder rpl_remainder
  1613. # endif
  1614. _GL_FUNCDECL_RPL (remainder, double, (double x, double y));
  1615. _GL_CXXALIAS_RPL (remainder, double, (double x, double y));
  1616. # else
  1617. # if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
  1618. _GL_FUNCDECL_SYS (remainder, double, (double x, double y));
  1619. # endif
  1620. _GL_CXXALIAS_SYS (remainder, double, (double x, double y));
  1621. # endif
  1622. _GL_CXXALIASWARN (remainder);
  1623. #elif defined GNULIB_POSIXCHECK
  1624. # undef remainder
  1625. # if HAVE_RAW_DECL_REMAINDER
  1626. _GL_WARN_ON_USE (remainder, "remainder is unportable - "
  1627. "use gnulib module remainder for portability");
  1628. # endif
  1629. #endif
  1630. #if @GNULIB_REMAINDERL@
  1631. # if @REPLACE_REMAINDERL@
  1632. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1633. # undef remainderl
  1634. # define remainderl rpl_remainderl
  1635. # endif
  1636. _GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y));
  1637. _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
  1638. # else
  1639. # if !@HAVE_DECL_REMAINDERL@
  1640. # undef remainderl
  1641. _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
  1642. # endif
  1643. _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
  1644. # endif
  1645. _GL_CXXALIASWARN (remainderl);
  1646. #elif defined GNULIB_POSIXCHECK
  1647. # undef remainderl
  1648. # if HAVE_RAW_DECL_REMAINDERL
  1649. _GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
  1650. "use gnulib module remainderl for portability");
  1651. # endif
  1652. #endif
  1653. #if @GNULIB_RINTF@
  1654. # if !@HAVE_DECL_RINTF@
  1655. _GL_FUNCDECL_SYS (rintf, float, (float x));
  1656. # endif
  1657. _GL_CXXALIAS_SYS (rintf, float, (float x));
  1658. _GL_CXXALIASWARN (rintf);
  1659. #elif defined GNULIB_POSIXCHECK
  1660. # undef rintf
  1661. # if HAVE_RAW_DECL_RINTF
  1662. _GL_WARN_ON_USE (rintf, "rintf is unportable - "
  1663. "use gnulib module rintf for portability");
  1664. # endif
  1665. #endif
  1666. #if @GNULIB_RINT@
  1667. # if !@HAVE_RINT@
  1668. _GL_FUNCDECL_SYS (rint, double, (double x));
  1669. # endif
  1670. _GL_CXXALIAS_SYS (rint, double, (double x));
  1671. _GL_CXXALIASWARN (rint);
  1672. #elif defined GNULIB_POSIXCHECK
  1673. # undef rint
  1674. # if HAVE_RAW_DECL_RINT
  1675. _GL_WARN_ON_USE (rint, "rint is unportable - "
  1676. "use gnulib module rint for portability");
  1677. # endif
  1678. #endif
  1679. #if @GNULIB_RINTL@
  1680. # if !@HAVE_RINTL@
  1681. _GL_FUNCDECL_SYS (rintl, long double, (long double x));
  1682. # endif
  1683. _GL_CXXALIAS_SYS (rintl, long double, (long double x));
  1684. _GL_CXXALIASWARN (rintl);
  1685. #elif defined GNULIB_POSIXCHECK
  1686. # undef rintl
  1687. # if HAVE_RAW_DECL_RINTL
  1688. _GL_WARN_ON_USE (rintl, "rintl is unportable - "
  1689. "use gnulib module rintl for portability");
  1690. # endif
  1691. #endif
  1692. #if @GNULIB_ROUNDF@
  1693. # if @REPLACE_ROUNDF@
  1694. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1695. # undef roundf
  1696. # define roundf rpl_roundf
  1697. # endif
  1698. _GL_FUNCDECL_RPL (roundf, float, (float x));
  1699. _GL_CXXALIAS_RPL (roundf, float, (float x));
  1700. # else
  1701. # if !@HAVE_DECL_ROUNDF@
  1702. _GL_FUNCDECL_SYS (roundf, float, (float x));
  1703. # endif
  1704. _GL_CXXALIAS_SYS (roundf, float, (float x));
  1705. # endif
  1706. _GL_CXXALIASWARN (roundf);
  1707. #elif defined GNULIB_POSIXCHECK
  1708. # undef roundf
  1709. # if HAVE_RAW_DECL_ROUNDF
  1710. _GL_WARN_ON_USE (roundf, "roundf is unportable - "
  1711. "use gnulib module roundf for portability");
  1712. # endif
  1713. #endif
  1714. #if @GNULIB_ROUND@
  1715. # if @REPLACE_ROUND@
  1716. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1717. # undef round
  1718. # define round rpl_round
  1719. # endif
  1720. _GL_FUNCDECL_RPL (round, double, (double x));
  1721. _GL_CXXALIAS_RPL (round, double, (double x));
  1722. # else
  1723. # if !@HAVE_DECL_ROUND@
  1724. _GL_FUNCDECL_SYS (round, double, (double x));
  1725. # endif
  1726. _GL_CXXALIAS_SYS (round, double, (double x));
  1727. # endif
  1728. _GL_CXXALIASWARN (round);
  1729. #elif defined GNULIB_POSIXCHECK
  1730. # undef round
  1731. # if HAVE_RAW_DECL_ROUND
  1732. _GL_WARN_ON_USE (round, "round is unportable - "
  1733. "use gnulib module round for portability");
  1734. # endif
  1735. #endif
  1736. #if @GNULIB_ROUNDL@
  1737. # if @REPLACE_ROUNDL@
  1738. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1739. # undef roundl
  1740. # define roundl rpl_roundl
  1741. # endif
  1742. _GL_FUNCDECL_RPL (roundl, long double, (long double x));
  1743. _GL_CXXALIAS_RPL (roundl, long double, (long double x));
  1744. # else
  1745. # if !@HAVE_DECL_ROUNDL@
  1746. # undef roundl
  1747. _GL_FUNCDECL_SYS (roundl, long double, (long double x));
  1748. # endif
  1749. _GL_CXXALIAS_SYS (roundl, long double, (long double x));
  1750. # endif
  1751. _GL_CXXALIASWARN (roundl);
  1752. #elif defined GNULIB_POSIXCHECK
  1753. # undef roundl
  1754. # if HAVE_RAW_DECL_ROUNDL
  1755. _GL_WARN_ON_USE (roundl, "roundl is unportable - "
  1756. "use gnulib module roundl for portability");
  1757. # endif
  1758. #endif
  1759. #if @GNULIB_SINF@
  1760. # if @REPLACE_SINF@
  1761. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1762. # undef sinf
  1763. # define sinf rpl_sinf
  1764. # endif
  1765. _GL_FUNCDECL_RPL (sinf, float, (float x));
  1766. _GL_CXXALIAS_RPL (sinf, float, (float x));
  1767. # else
  1768. # if !@HAVE_SINF@
  1769. # undef sinf
  1770. _GL_FUNCDECL_SYS (sinf, float, (float x));
  1771. # endif
  1772. _GL_CXXALIAS_SYS (sinf, float, (float x));
  1773. # endif
  1774. _GL_CXXALIASWARN (sinf);
  1775. #elif defined GNULIB_POSIXCHECK
  1776. # undef sinf
  1777. # if HAVE_RAW_DECL_SINF
  1778. _GL_WARN_ON_USE (sinf, "sinf is unportable - "
  1779. "use gnulib module sinf for portability");
  1780. # endif
  1781. #endif
  1782. #if @GNULIB_SINL@
  1783. # if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
  1784. # undef sinl
  1785. _GL_FUNCDECL_SYS (sinl, long double, (long double x));
  1786. # endif
  1787. _GL_CXXALIAS_SYS (sinl, long double, (long double x));
  1788. _GL_CXXALIASWARN (sinl);
  1789. #elif defined GNULIB_POSIXCHECK
  1790. # undef sinl
  1791. # if HAVE_RAW_DECL_SINL
  1792. _GL_WARN_ON_USE (sinl, "sinl is unportable - "
  1793. "use gnulib module sinl for portability");
  1794. # endif
  1795. #endif
  1796. #if @GNULIB_SINHF@
  1797. # if @REPLACE_SINHF@
  1798. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1799. # undef sinhf
  1800. # define sinhf rpl_sinhf
  1801. # endif
  1802. _GL_FUNCDECL_RPL (sinhf, float, (float x));
  1803. _GL_CXXALIAS_RPL (sinhf, float, (float x));
  1804. # else
  1805. # if !@HAVE_SINHF@
  1806. # undef sinhf
  1807. _GL_FUNCDECL_SYS (sinhf, float, (float x));
  1808. # endif
  1809. _GL_CXXALIAS_SYS (sinhf, float, (float x));
  1810. # endif
  1811. _GL_CXXALIASWARN (sinhf);
  1812. #elif defined GNULIB_POSIXCHECK
  1813. # undef sinhf
  1814. # if HAVE_RAW_DECL_SINHF
  1815. _GL_WARN_ON_USE (sinhf, "sinhf is unportable - "
  1816. "use gnulib module sinhf for portability");
  1817. # endif
  1818. #endif
  1819. #if @GNULIB_SQRTF@
  1820. # if @REPLACE_SQRTF@
  1821. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1822. # undef sqrtf
  1823. # define sqrtf rpl_sqrtf
  1824. # endif
  1825. _GL_FUNCDECL_RPL (sqrtf, float, (float x));
  1826. _GL_CXXALIAS_RPL (sqrtf, float, (float x));
  1827. # else
  1828. # if !@HAVE_SQRTF@
  1829. # undef sqrtf
  1830. _GL_FUNCDECL_SYS (sqrtf, float, (float x));
  1831. # endif
  1832. _GL_CXXALIAS_SYS (sqrtf, float, (float x));
  1833. # endif
  1834. _GL_CXXALIASWARN (sqrtf);
  1835. #elif defined GNULIB_POSIXCHECK
  1836. # undef sqrtf
  1837. # if HAVE_RAW_DECL_SQRTF
  1838. _GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - "
  1839. "use gnulib module sqrtf for portability");
  1840. # endif
  1841. #endif
  1842. #if @GNULIB_SQRTL@
  1843. # if @REPLACE_SQRTL@
  1844. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1845. # undef sqrtl
  1846. # define sqrtl rpl_sqrtl
  1847. # endif
  1848. _GL_FUNCDECL_RPL (sqrtl, long double, (long double x));
  1849. _GL_CXXALIAS_RPL (sqrtl, long double, (long double x));
  1850. # else
  1851. # if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
  1852. # undef sqrtl
  1853. _GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
  1854. # endif
  1855. _GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
  1856. # endif
  1857. _GL_CXXALIASWARN (sqrtl);
  1858. #elif defined GNULIB_POSIXCHECK
  1859. # undef sqrtl
  1860. # if HAVE_RAW_DECL_SQRTL
  1861. _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
  1862. "use gnulib module sqrtl for portability");
  1863. # endif
  1864. #endif
  1865. #if @GNULIB_TANF@
  1866. # if @REPLACE_TANF@
  1867. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1868. # undef tanf
  1869. # define tanf rpl_tanf
  1870. # endif
  1871. _GL_FUNCDECL_RPL (tanf, float, (float x));
  1872. _GL_CXXALIAS_RPL (tanf, float, (float x));
  1873. # else
  1874. # if !@HAVE_TANF@
  1875. # undef tanf
  1876. _GL_FUNCDECL_SYS (tanf, float, (float x));
  1877. # endif
  1878. _GL_CXXALIAS_SYS (tanf, float, (float x));
  1879. # endif
  1880. _GL_CXXALIASWARN (tanf);
  1881. #elif defined GNULIB_POSIXCHECK
  1882. # undef tanf
  1883. # if HAVE_RAW_DECL_TANF
  1884. _GL_WARN_ON_USE (tanf, "tanf is unportable - "
  1885. "use gnulib module tanf for portability");
  1886. # endif
  1887. #endif
  1888. #if @GNULIB_TANL@
  1889. # if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
  1890. # undef tanl
  1891. _GL_FUNCDECL_SYS (tanl, long double, (long double x));
  1892. # endif
  1893. _GL_CXXALIAS_SYS (tanl, long double, (long double x));
  1894. _GL_CXXALIASWARN (tanl);
  1895. #elif defined GNULIB_POSIXCHECK
  1896. # undef tanl
  1897. # if HAVE_RAW_DECL_TANL
  1898. _GL_WARN_ON_USE (tanl, "tanl is unportable - "
  1899. "use gnulib module tanl for portability");
  1900. # endif
  1901. #endif
  1902. #if @GNULIB_TANHF@
  1903. # if @REPLACE_TANHF@
  1904. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1905. # undef tanhf
  1906. # define tanhf rpl_tanhf
  1907. # endif
  1908. _GL_FUNCDECL_RPL (tanhf, float, (float x));
  1909. _GL_CXXALIAS_RPL (tanhf, float, (float x));
  1910. # else
  1911. # if !@HAVE_TANHF@
  1912. # undef tanhf
  1913. _GL_FUNCDECL_SYS (tanhf, float, (float x));
  1914. # endif
  1915. _GL_CXXALIAS_SYS (tanhf, float, (float x));
  1916. # endif
  1917. _GL_CXXALIASWARN (tanhf);
  1918. #elif defined GNULIB_POSIXCHECK
  1919. # undef tanhf
  1920. # if HAVE_RAW_DECL_TANHF
  1921. _GL_WARN_ON_USE (tanhf, "tanhf is unportable - "
  1922. "use gnulib module tanhf for portability");
  1923. # endif
  1924. #endif
  1925. #if @GNULIB_TRUNCF@
  1926. # if @REPLACE_TRUNCF@
  1927. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1928. # undef truncf
  1929. # define truncf rpl_truncf
  1930. # endif
  1931. _GL_FUNCDECL_RPL (truncf, float, (float x));
  1932. _GL_CXXALIAS_RPL (truncf, float, (float x));
  1933. # else
  1934. # if !@HAVE_DECL_TRUNCF@
  1935. _GL_FUNCDECL_SYS (truncf, float, (float x));
  1936. # endif
  1937. _GL_CXXALIAS_SYS (truncf, float, (float x));
  1938. # endif
  1939. _GL_CXXALIASWARN (truncf);
  1940. #elif defined GNULIB_POSIXCHECK
  1941. # undef truncf
  1942. # if HAVE_RAW_DECL_TRUNCF
  1943. _GL_WARN_ON_USE (truncf, "truncf is unportable - "
  1944. "use gnulib module truncf for portability");
  1945. # endif
  1946. #endif
  1947. #if @GNULIB_TRUNC@
  1948. # if @REPLACE_TRUNC@
  1949. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1950. # undef trunc
  1951. # define trunc rpl_trunc
  1952. # endif
  1953. _GL_FUNCDECL_RPL (trunc, double, (double x));
  1954. _GL_CXXALIAS_RPL (trunc, double, (double x));
  1955. # else
  1956. # if !@HAVE_DECL_TRUNC@
  1957. _GL_FUNCDECL_SYS (trunc, double, (double x));
  1958. # endif
  1959. _GL_CXXALIAS_SYS (trunc, double, (double x));
  1960. # endif
  1961. _GL_CXXALIASWARN (trunc);
  1962. #elif defined GNULIB_POSIXCHECK
  1963. # undef trunc
  1964. # if HAVE_RAW_DECL_TRUNC
  1965. _GL_WARN_ON_USE (trunc, "trunc is unportable - "
  1966. "use gnulib module trunc for portability");
  1967. # endif
  1968. #endif
  1969. #if @GNULIB_TRUNCL@
  1970. # if @REPLACE_TRUNCL@
  1971. # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
  1972. # undef truncl
  1973. # define truncl rpl_truncl
  1974. # endif
  1975. _GL_FUNCDECL_RPL (truncl, long double, (long double x));
  1976. _GL_CXXALIAS_RPL (truncl, long double, (long double x));
  1977. # else
  1978. # if !@HAVE_DECL_TRUNCL@
  1979. _GL_FUNCDECL_SYS (truncl, long double, (long double x));
  1980. # endif
  1981. _GL_CXXALIAS_SYS (truncl, long double, (long double x));
  1982. # endif
  1983. _GL_CXXALIASWARN (truncl);
  1984. #elif defined GNULIB_POSIXCHECK
  1985. # undef truncl
  1986. # if HAVE_RAW_DECL_TRUNCL
  1987. _GL_WARN_ON_USE (truncl, "truncl is unportable - "
  1988. "use gnulib module truncl for portability");
  1989. # endif
  1990. #endif
  1991. /* Definitions of function-like macros come here, after the function
  1992. declarations. */
  1993. #if @GNULIB_ISFINITE@
  1994. # if @REPLACE_ISFINITE@
  1995. _GL_EXTERN_C int gl_isfinitef (float x);
  1996. _GL_EXTERN_C int gl_isfinited (double x);
  1997. _GL_EXTERN_C int gl_isfinitel (long double x);
  1998. # undef isfinite
  1999. # define isfinite(x) \
  2000. (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
  2001. sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
  2002. gl_isfinitef (x))
  2003. # endif
  2004. # ifdef __cplusplus
  2005. # if defined isfinite || defined GNULIB_NAMESPACE
  2006. _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
  2007. # undef isfinite
  2008. _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite)
  2009. # endif
  2010. # endif
  2011. #elif defined GNULIB_POSIXCHECK
  2012. # if defined isfinite
  2013. _GL_WARN_REAL_FLOATING_DECL (isfinite);
  2014. # undef isfinite
  2015. # define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
  2016. # endif
  2017. #endif
  2018. #if @GNULIB_ISINF@
  2019. # if @REPLACE_ISINF@
  2020. _GL_EXTERN_C int gl_isinff (float x);
  2021. _GL_EXTERN_C int gl_isinfd (double x);
  2022. _GL_EXTERN_C int gl_isinfl (long double x);
  2023. # undef isinf
  2024. # define isinf(x) \
  2025. (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
  2026. sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
  2027. gl_isinff (x))
  2028. # endif
  2029. # ifdef __cplusplus
  2030. # if defined isinf || defined GNULIB_NAMESPACE
  2031. _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
  2032. # undef isinf
  2033. _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf)
  2034. # endif
  2035. # endif
  2036. #elif defined GNULIB_POSIXCHECK
  2037. # if defined isinf
  2038. _GL_WARN_REAL_FLOATING_DECL (isinf);
  2039. # undef isinf
  2040. # define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
  2041. # endif
  2042. #endif
  2043. #if @GNULIB_ISNANF@
  2044. /* Test for NaN for 'float' numbers. */
  2045. # if @HAVE_ISNANF@
  2046. /* The original <math.h> included above provides a declaration of isnan macro
  2047. or (older) isnanf function. */
  2048. # if __GNUC__ >= 4
  2049. /* GCC 4.0 and newer provides three built-ins for isnan. */
  2050. # undef isnanf
  2051. # define isnanf(x) __builtin_isnanf ((float)(x))
  2052. # elif defined isnan
  2053. # undef isnanf
  2054. # define isnanf(x) isnan ((float)(x))
  2055. # endif
  2056. # else
  2057. /* Test whether X is a NaN. */
  2058. # undef isnanf
  2059. # define isnanf rpl_isnanf
  2060. _GL_EXTERN_C int isnanf (float x);
  2061. # endif
  2062. #endif
  2063. #if @GNULIB_ISNAND@
  2064. /* Test for NaN for 'double' numbers.
  2065. This function is a gnulib extension, unlike isnan() which applied only
  2066. to 'double' numbers earlier but now is a type-generic macro. */
  2067. # if @HAVE_ISNAND@
  2068. /* The original <math.h> included above provides a declaration of isnan
  2069. macro. */
  2070. # if __GNUC__ >= 4
  2071. /* GCC 4.0 and newer provides three built-ins for isnan. */
  2072. # undef isnand
  2073. # define isnand(x) __builtin_isnan ((double)(x))
  2074. # else
  2075. # undef isnand
  2076. # define isnand(x) isnan ((double)(x))
  2077. # endif
  2078. # else
  2079. /* Test whether X is a NaN. */
  2080. # undef isnand
  2081. # define isnand rpl_isnand
  2082. _GL_EXTERN_C int isnand (double x);
  2083. # endif
  2084. #endif
  2085. #if @GNULIB_ISNANL@
  2086. /* Test for NaN for 'long double' numbers. */
  2087. # if @HAVE_ISNANL@
  2088. /* The original <math.h> included above provides a declaration of isnan
  2089. macro or (older) isnanl function. */
  2090. # if __GNUC__ >= 4
  2091. /* GCC 4.0 and newer provides three built-ins for isnan. */
  2092. # undef isnanl
  2093. # define isnanl(x) __builtin_isnanl ((long double)(x))
  2094. # elif defined isnan
  2095. # undef isnanl
  2096. # define isnanl(x) isnan ((long double)(x))
  2097. # endif
  2098. # else
  2099. /* Test whether X is a NaN. */
  2100. # undef isnanl
  2101. # define isnanl rpl_isnanl
  2102. _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
  2103. # endif
  2104. #endif
  2105. /* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
  2106. #if @GNULIB_ISNAN@
  2107. # if @REPLACE_ISNAN@
  2108. /* We can't just use the isnanf macro (e.g.) as exposed by
  2109. isnanf.h (e.g.) here, because those may end up being macros
  2110. that recursively expand back to isnan. So use the gnulib
  2111. replacements for them directly. */
  2112. # if @HAVE_ISNANF@ && __GNUC__ >= 4
  2113. # define gl_isnan_f(x) __builtin_isnanf ((float)(x))
  2114. # else
  2115. _GL_EXTERN_C int rpl_isnanf (float x);
  2116. # define gl_isnan_f(x) rpl_isnanf (x)
  2117. # endif
  2118. # if @HAVE_ISNAND@ && __GNUC__ >= 4
  2119. # define gl_isnan_d(x) __builtin_isnan ((double)(x))
  2120. # else
  2121. _GL_EXTERN_C int rpl_isnand (double x);
  2122. # define gl_isnan_d(x) rpl_isnand (x)
  2123. # endif
  2124. # if @HAVE_ISNANL@ && __GNUC__ >= 4
  2125. # define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
  2126. # else
  2127. _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
  2128. # define gl_isnan_l(x) rpl_isnanl (x)
  2129. # endif
  2130. # undef isnan
  2131. # define isnan(x) \
  2132. (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
  2133. sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
  2134. gl_isnan_f (x))
  2135. # elif __GNUC__ >= 4
  2136. # undef isnan
  2137. # define isnan(x) \
  2138. (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
  2139. sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
  2140. __builtin_isnanf ((float)(x)))
  2141. # endif
  2142. # ifdef __cplusplus
  2143. # if defined isnan || defined GNULIB_NAMESPACE
  2144. _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
  2145. # undef isnan
  2146. _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan)
  2147. # endif
  2148. # else
  2149. /* Ensure isnan is a macro. */
  2150. # ifndef isnan
  2151. # define isnan isnan
  2152. # endif
  2153. # endif
  2154. #elif defined GNULIB_POSIXCHECK
  2155. # if defined isnan
  2156. _GL_WARN_REAL_FLOATING_DECL (isnan);
  2157. # undef isnan
  2158. # define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
  2159. # endif
  2160. #endif
  2161. #if @GNULIB_SIGNBIT@
  2162. # if (@REPLACE_SIGNBIT_USING_GCC@ \
  2163. && (!defined __cplusplus || __cplusplus < 201103))
  2164. # undef signbit
  2165. /* GCC 4.0 and newer provides three built-ins for signbit. */
  2166. # define signbit(x) \
  2167. (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
  2168. sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
  2169. __builtin_signbitf (x))
  2170. # endif
  2171. # if @REPLACE_SIGNBIT@
  2172. # undef signbit
  2173. _GL_EXTERN_C int gl_signbitf (float arg);
  2174. _GL_EXTERN_C int gl_signbitd (double arg);
  2175. _GL_EXTERN_C int gl_signbitl (long double arg);
  2176. # if __GNUC__ >= 2 && !defined __STRICT_ANSI__
  2177. # define _GL_NUM_UINT_WORDS(type) \
  2178. ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
  2179. # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
  2180. # define gl_signbitf_OPTIMIZED_MACRO
  2181. # define gl_signbitf(arg) \
  2182. ({ union { float _value; \
  2183. unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
  2184. } _m; \
  2185. _m._value = (arg); \
  2186. (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
  2187. })
  2188. # endif
  2189. # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
  2190. # define gl_signbitd_OPTIMIZED_MACRO
  2191. # define gl_signbitd(arg) \
  2192. ({ union { double _value; \
  2193. unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
  2194. } _m; \
  2195. _m._value = (arg); \
  2196. (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
  2197. })
  2198. # endif
  2199. # if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
  2200. # define gl_signbitl_OPTIMIZED_MACRO
  2201. # define gl_signbitl(arg) \
  2202. ({ union { long double _value; \
  2203. unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
  2204. } _m; \
  2205. _m._value = (arg); \
  2206. (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
  2207. })
  2208. # endif
  2209. # endif
  2210. # define signbit(x) \
  2211. (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
  2212. sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
  2213. gl_signbitf (x))
  2214. # endif
  2215. # ifdef __cplusplus
  2216. # if defined signbit || defined GNULIB_NAMESPACE
  2217. _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
  2218. # undef signbit
  2219. _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
  2220. # endif
  2221. # endif
  2222. #elif defined GNULIB_POSIXCHECK
  2223. # if defined signbit
  2224. _GL_WARN_REAL_FLOATING_DECL (signbit);
  2225. # undef signbit
  2226. # define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
  2227. # endif
  2228. #endif
  2229. _GL_INLINE_HEADER_END
  2230. #endif /* _@GUARD_PREFIX@_MATH_H */
  2231. #endif /* _@GUARD_PREFIX@_MATH_H */