math.in.h 64 KB

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