math.in.h 64 KB

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