1 /* ----------------------------------------------------------------------------
3 * ----------------------------------------------------------------------------
4 * Public Domain C Library - http://pdclib.sourceforge.net
5 * This code is Public Domain. Use, modify, and redistribute at will.
6 * ----------------------------------------------------------------------------
8 * --------------------------------------------------------------------------*/
11 #define _MATH_H _MATH_H
13 /* TODO: Documentation */
15 /* ----------------------------------------------------------------------------
17 * --------------------------------------------------------------------------*/
19 #define HUGE_VAL ((double)0x7FF0000000000000) /* TODO */
20 #define HUGE_VALF ((float)0x7F800000) /* TODO */
21 #define HUGE_VALL ((long double)0x7FFF8000000000000000) /* TODO */
23 #define INFINITY ((float)0x7F800000) /* TODO */
24 #define NAN ((float)0x7F800001) /* TODO */
26 /* The following values are platform dependant, must be personality. */
28 #define FP_FAST_FMA /* TODO */
29 #define FP_FAST_FMAF /* TODO */
30 #define FP_FAST_FMAL /* TODO */
33 /* These values are used instead of constants to classify numbers. */
34 #define FP_UNDEFINED 0
38 #define FP_SUBNORMAL 4
41 #define FP_ILOGB0 /* TODO */
42 #define FP_ILOGBNAN /* TODO */
45 #define MATH_ERREXCEPT 2
47 /* should be MATH_ERRNO | MATH_ERREXCEPT if we do exceptions. Do we? It's
48 * nice if this is implementation-wide the same.
50 #define math_errhandling ((int)MATH_ERRNO)
52 /* ----------------------------------------------------------------------------
54 * --------------------------------------------------------------------------*/
57 #if FLT_EVAL_METHOD == 0
59 #elif FLT_EVAL_METHOD == 1
61 #elif FLT_EVAL_METHOD == 2
64 /* TODO - this is implementation defined and cpu dependant */
69 #if FLT_EVAL_METHOD == 0
71 #elif FLT_EVAL_METHOD == 1
73 #elif FLT_EVAL_METHOD == 2
76 /* TODO - this is implementation defined and cpu dependant */
80 /* ----------------------------------------------------------------------------
82 * --------------------------------------------------------------------------*/
84 #define isgreater( x, y ) /* TODO */
85 #define isgreaterequal( x, y ) /* TODO */
86 #define isless( x, y ) /* TODO */
87 #define islessequal( x, y ) /* TODO */
88 #define islessgreater( x, y ) /* TODO */
89 #define isunordered( x, y ) /* TODO */
91 /* Could somebody clean this macro up? It uses 7 other definitions (below).
92 * Also, I suspect this macro to be personality-dependant. Somebody confirm
95 #define fp_mef 0x7F800000
96 #define fp_mff 0x007FFFFF
97 #define fp_med 0x7FF0000000000000
98 #define fp_mfd 0x000FFFFFFFFFFFFF
99 #define fp_mel 0x7FFF8000000000000000
100 #define fp_mjl 0x00004000000000000000 // the j-bit mask
101 #define fp_mfl 0x00003FFFFFFFFFFFFFFF
103 #define fpclassify( x ) ((sizeof(x) == sizeof(float)) ? ( \
104 (((x) & fp_mef) == (fp_mef)) ? ( \
105 (((x) & fp_mff) == (0)) ? ( \
111 (((x) & fp_mef) == (0)) ? ( \
112 (((x) & fp_mff) == (0)) ? ( \
122 (sizeof(x) == sizeof(double)) ? ( \
123 (((x) & fp_med) == (fp_med)) ? ( \
124 (((x) & fp_mfd) == (0)) ? ( \
130 (((x) & fp_med) == (0)) ? ( \
131 (((x) & fp_mfd) == (0)) ? ( \
141 (((x) & fp_mel) == (fp_mel)) ? ( \
142 (((x) & fp_mjl) == (fp_mjl)) ? ( \
145 (((x) & fp_mfl) == (fp_mfl)) ? ( \
152 (((x) & fp_mel) == (0)) ? ( \
153 (((x) & fp_mjl) == (fp_mjl)) ? ( \
154 FP_NORMAL \ // or actually, pseudo-denormal
156 (((x) & fp_mfl) == (fp_mfl)) ? ( \
163 (((x) & fp_mjl) == (fp_mjl)) ? ( \
174 #define isfinite( x ) ((sizeof(x) == sizeof(float)) ? ( \
175 (((x) & fp_mef) == (fp_mef)) ? ( \
181 (sizeof(x) == sizeof(double)) ? ( \
182 (((x) & fp_med) == (fp_med)) ? ( \
188 (((x) & fp_mel) == (fp_mel)) ? ( \
191 (((x) & fp_mel) == (0)) ? ( \
192 (((x) & fp_mjl) == (fp_mjl)) ? ( \
198 (((x) & fp_mjl) == (fp_mjl)) ? ( \
209 #define isinf( x ) ((sizeof(x) == sizeof(float)) ? ( \
210 (((x) & fp_mef) == (fp_mef)) ? ( \
211 (((x) & fp_mff) == (0)) ? ( \
219 ) : ((sizeof(x) == sizeof(double)) ? ( \
220 (((x) & fp_med) == (fp_med)) ? ( \
221 (((x) & fp_mfd) == (0)) ? ( \
230 (((x) & fp_mel) == (fp_mel)) ? ( \
231 (((x) & fp_mjl) == (0)) ? ( \
232 (((x) & fp_mfl) == (fp_mfl)) ? ( \
247 #define isnan( x ) ((sizeof(x) == sizeof(float)) ? ( \
248 (((x) & fp_mef) == (fp_mef)) ? ( \
249 (((x) & fp_mff) == (0)) ? ( \
257 ) : ((sizeof(x) == sizeof(double)) ? ( \
258 (((x) & fp_med) == (fp_med)) ? ( \
259 (((x) & fp_mfd) == (0)) ? ( \
268 (((x) & fp_mel) == (fp_mel)) ? ( \
269 (((x) & fp_mjl) == (0)) ? ( \
270 (((x) & fp_mfl) == (fp_mfl)) ? ( \
285 #define isnormal( x ) ((sizeof(x) == sizeof(float)) ? ( \
286 (((x) & fp_mef) == (fp_mef)) ? ( \
289 (((x) & fp_mef) == (0)) ? ( \
295 ) : ((sizeof(x) == sizeof(double)) ? ( \
296 (((x) & fp_med) == (fp_med)) ? ( \
299 (((x) & fp_med) == (0)) ? ( \
306 (((x) & fp_mel) == (fp_mel)) ? ( \
309 (((x) & fp_mel) == (0)) ? ( \
310 (((x) & fp_mjl) == (fp_mjl)) ? ( \
316 (((x) & fp_mjl) == (fp_mjl)) ? ( \
327 #define signbit( x ) ((sizeof(x) == sizeof(float)) ? ( \
328 (((x) & 0x80000000) == (0)) ? ( \
333 ) : ((sizeof(x) == sizeof(double)) ? ( \
334 (((x) & 0x8000000000000000) == (0)) ? ( \
340 (((x) & 0x80000000000000000000) == (0)) ? ( \
349 /* ----------------------------------------------------------------------------
351 * --------------------------------------------------------------------------*/
353 /** These functions return the magnitude of x.
354 * @param x The value to find the absolute value of.
355 * @return The absolute value of x.
359 double fabs( double x );
361 /** These functions return the magnitude of x.
362 * @param x The value to find the absolute value of.
363 * @return The absolute value of x.
367 float fabsf( float x );
369 /** These functions return the magnitude of x.
370 * @param x The value to find the absolute value of.
371 * @return The absolute value of x.
375 long double fabsl( long double x );
377 /** These functions compute the sine of x (measured in radians).
378 * @param x The value to compute the sine of.
379 * @return The sine of x.
387 double sin( double x );
389 /** These functions compute the sine of x (measured in radians).
390 * @param x The value to compute the sine of.
391 * @return The sine of x.
399 float sinf( float x );
401 /** These functions compute the sine of x (measured in radians).
402 * @param x The value to compute the sine of.
403 * @return The sine of x.
411 long double sinl( long double x );
413 /** These functions compute the hyperbolic sine of x (measured in radians).
414 * @param x The value to compute the hyperbolic sine of.
415 * @return The hyperbolic sine of x.
423 double sinh( double x );
425 /** These functions compute the hyperbolic sine of x (measured in radians).
426 * @param x The value to compute the hyperbolic sine of.
427 * @return The hyperbolic sine of x.
435 float sinhf( float x );
437 /** These functions compute the hyperbolic sine of x (measured in radians).
438 * @param x The value to compute the hyperbolic sine of.
439 * @return The hyperbolic sine of x.
447 long double sinhl( long double x );
449 /** These functions compute the arcsine of x (measured in radians).
450 * @param x The value to compute the arcsine of.
451 * @return The arcsine of x.
459 double asin( double x );
461 /** These functions compute the arcsine of x (measured in radians).
462 * @param x The value to compute the arcsine of.
463 * @return The arcsine of x.
471 float asinf( float x );
473 /** These functions compute the arcsine of x (measured in radians).
474 * @param x The value to compute the arcsine of.
475 * @return The arcsine of x.
483 long double asinl( long double x );
485 /** These functions compute the hyperbolic arcsine of x (measured in radians).
486 * @param x The value to compute the hyperbolic arcsine of.
487 * @return The hyperbolic arcsine of x.
495 double asinh( double x );
497 /** These functions compute the hyperbolic arcsine of x (measured in radians).
498 * @param x The value to compute the hyperbolic arcsine of.
499 * @return The hyperbolic arcsine of x.
507 float asinhf( float x );
509 /** These functions compute the hyperbolic arcsine of x (measured in radians).
510 * @param x The value to compute the hyperbolic arcsine of.
511 * @return The hyperbolic arcsine of x.
519 long double asinhl( long double x );
521 /** These functions compute the cosine of x (measured in radians).
522 * @param x The value to compute the cosine of.
523 * @return The cosine of x.
531 double cos( double x );
533 /** These functions compute the cosine of x (measured in radians).
534 * @param x The value to compute the cosine of.
535 * @return The cosine of x.
543 float cosf( float x );
545 /** These functions compute the cosine of x (measured in radians).
546 * @param x The value to compute the cosine of.
547 * @return The cosine of x.
555 long double cosl( long double x );
557 /** These functions compute the hyperbolic cosine of x (measured in radians).
558 * @param x The value to compute the hyperbolic cosine of.
559 * @return The hyperbolic cosine of x.
567 double cosh( double x );
569 /** These functions compute the hyperbolic cosine of x (measured in radians).
570 * @param x The value to compute the hyperbolic cosine of.
571 * @return The hyperbolic cosine of x.
579 float coshf( float x );
581 /** These functions compute the hyperbolic cosine of x (measured in radians).
582 * @param x The value to compute the hyperbolic cosine of.
583 * @return The hyperbolic cosine of x.
591 long double coshl( long double x );
593 /** These functions compute the arccosine of x (measured in radians).
594 * @param x The value to compute the arccosine of.
595 * @return The arccosine of x.
603 double acos( double x );
605 /** These functions compute the arccosine of x (measured in radians).
606 * @param x The value to compute the arccosine of.
607 * @return The arccosine of x.
615 float acosf( float x );
617 /** These functions compute the arccosine of x (measured in radians).
618 * @param x The value to compute the arccosine of.
619 * @return The arccosine of x.
627 long double acosl( long double x );
629 /** These functions compute the hyperbolic arccosine of x (measured in radians).
630 * @param x The value to compute the hyperbolic arccosine of.
631 * @return The hyperbolic arccosine of x.
639 double acosh( double x );
641 /** These functions compute the hyperbolic arccosine of x (measured in radians).
642 * @param x The value to compute the hyperbolic arccosine of.
643 * @return The hyperbolic arccosine of x.
651 float acoshf( float x );
653 /** These functions compute the hyperbolic arccosine of x (measured in radians).
654 * @param x The value to compute the hyperbolic arccosine of.
655 * @return The hyperbolic arccosine of x.
663 long double acoshl( long double x );
665 /** These functions compute the tangent of x (measured in radians).
666 * @param x The value to compute the tangent of.
667 * @return The tangent of x.
675 double tan( double x );
677 /** These functions compute the tangent of x (measured in radians).
678 * @param x The value to compute the tangent of.
679 * @return The tangent of x.
687 float tanf( float x );
689 /** These functions compute the tangent of x (measured in radians).
690 * @param x The value to compute the tangent of.
691 * @return The tangent of x.
699 long double tanl( long double x );
701 /** These functions compute the hyperbolic tangent of x (measured in radians).
702 * @param x The value to compute the hyperbolic tangent of.
703 * @return The hyperbolic tangent of x.
711 double tanh( double x );
713 /** These functions compute the hyperbolic tangent of x (measured in radians).
714 * @param x The value to compute the hyperbolic tangent of.
715 * @return The hyperbolic tangent of x.
723 float tanhf( float x );
725 /** These functions compute the hyperbolic tangent of x (measured in radians).
726 * @param x The value to compute the hyperbolic tangent of.
727 * @return The hyperbolic tangent of x.
735 long double tanhl( long double x );
737 /** These functions compute the arctangent of x (measured in radians).
738 * @param x The value to compute the arctangent of.
739 * @return The arctangent of x.
748 double atan( double x );
750 /** These functions compute the arctangent of x (measured in radians).
751 * @param x The value to compute the arctangent of.
752 * @return The arctangent of x.
761 float atanf( float x );
763 /** These functions compute the arctangent of x (measured in radians).
764 * @param x The value to compute the arctangent of.
765 * @return The arctangent of x.
774 long double atanl( long double x );
776 /** These functions compute the hyperbolic arctangent of x (measured in radians).
777 * @param x The value to compute the hyperbolic arctangent of.
778 * @return The hyperbolic arctangent of x.
786 double atanh( double x );
788 /** These functions compute the hyperbolic arctangent of x (measured in radians).
789 * @param x The value to compute the hyperbolic arctangent of.
790 * @return The hyperbolic arctangent of x.
798 float atanhf( float x );
800 /** These functions compute the hyperbolic arctangent of x (measured in radians).
801 * @param x The value to compute the hyperbolic arctangent of.
802 * @return The hyperbolic arctangent of x.
810 long double atanhl( long double x );
812 /** These functions compute the hyperbolic arctangent of x / y (measured in radians).
813 * They return their answer between pi and -pi.
814 * @param y The first side of the triangle.
815 * @param x The second side of the triangle.
816 * @return The angle between the first and the second side.
825 double atan2( double y, double x );
827 /** These functions compute the hyperbolic arctangent of x / y (measured in radians).
828 * They return their answer between pi and -pi.
829 * @param y The first side of the triangle.
830 * @param x The second side of the triangle.
831 * @return The angle between the first and the second side.
840 float atan2f( float y, float x );
842 /** These functions compute the hyperbolic arctangent of x / y (measured in radians).
843 * They return their answer between pi and -pi.
844 * @param y The first side of the triangle.
845 * @param x The second side of the triangle.
846 * @return The angle between the first and the second side.
855 long double atan2l( long double y, long double x );
857 /** These functions compute the hypotenuse of a straight triangle.
858 * @param x The length of one side of the triangle.
859 * @param y The length of the other side of the triangle.
860 * @return The length of the hypotenuse, according to h = sqrt(x*x+y*y).
864 double hypot( double x, double y );
866 /** These functions compute the hypotenuse of a straight triangle.
867 * @param x The length of one side of the triangle.
868 * @param y The length of the other side of the triangle.
869 * @return The length of the hypotenuse, according to h = sqrt(x*x+y*y).
873 float hypotf( float x, float y );
875 /** These functions compute the hypotenuse of a straight triangle.
876 * @param x The length of one side of the triangle.
877 * @param y The length of the other side of the triangle.
878 * @return The length of the hypotenuse, according to h = sqrt(x*x+y*y).
882 long double hypotl( long double x, long double y );
884 /** These functions compute x raised to the power y.
885 * @param x The base of the power.
886 * @param y The exponent of the power.
887 * @return The base raised to the power of the exponent.
891 double pow( double x, double y );
893 /** These functions compute x raised to the power y.
894 * @param x The base of the power.
895 * @param y The exponent of the power.
896 * @return The base raised to the power of the exponent.
900 float powf( float x, float y );
902 /** These functions compute x raised to the power y.
903 * @param x The base of the power.
904 * @pa am y The exponent of the power.
905 * @return The base raised to the power of the exponent.
909 long double powl( long double x, long double y );
911 /** These functions compute the square root of x.
912 * @param x The value to take the square root of.
913 * @return The square root of x.
917 double sqrt( double x );
919 /** These functions compute the square root of x.
920 * @param x The value to take the square root of.
921 * @return The square root of x.
925 float sqrtf( float x );
927 /** These functions compute the square root of x.
928 * @param x The value to take the square root of.
929 * @return The square root of x.
933 long double sqrtl( long double x );
936 double cbrt( double x );
937 float cbrtf( float x );
938 long double cbrtl( long double x );
941 double exp( double x );
942 float expf( float x );
943 long double expl( long double x );
946 double exp2( double x );
947 float exp2f( float x );
948 long double exp2l( long double x );
951 double expm1( double x );
952 float expm1f( float x );
953 long double expm1l( long double x );
956 double frexp( double x, int * exp );
957 float frexpf( float x, int * exp );
958 long double frexpl( long double x, int * exp );
961 double ldexp( double x, int exp );
962 float ldexpf( float x, int exp );
963 long double ldexpl( long double x, int exp );
965 /** These functions compute the logarithm (base e) of x.
966 * @param x The value to take the logarithm of.
967 * @return The logarithm of x.
970 * @todo is this really the natural logarithm? wouldn't it be ln()?
972 double log( double x );
974 /** These functions compute the logarithm (base e) of x.
975 * @param x The value to take the logarithm of.
976 * @return The logarithm of x.
979 * @todo is this really the natural logarithm? wouldn't it be ln()?
981 float logf( float x );
983 /** These functions compute the logarithm (base e) of x.
984 * @param x The value to take the logarithm of.
985 * @return The logarithm of x.
988 * @todo is this really the natural logarithm? wouldn't it be ln()?
990 long double logl( long double x );
992 /** These functions compute the logarithm (base 10) of x.
993 * @param x The value to take the logarithm of.
994 * @return The logarithm of x.
998 double log10( double x );
1000 /** These functions compute the logarithm (base 10) of x.
1001 * @param x The value to take the logarithm of.
1002 * @return The logarithm of x.
1006 float log10f( float x );
1008 /** These functions compute the logarithm (base 10) of x.
1009 * @param x The value to take the logarithm of.
1010 * @return The logarithm of x.
1014 long double log10l( long double x );
1016 /** These functions compute the logarithm (base 2) of x.
1017 * @param x The value to take the logarithm of.
1018 * @return The logarithm of x.
1022 double log2( double x );
1024 /** These functions compute the logarithm (base 2) of x.
1025 * @param x The value to take the logarithm of.
1026 * @return The logarithm of x.
1030 float log2f( float x );
1032 /** These functions compute the logarithm (base 2) of x.
1033 * @param x The value to take the logarithm of.
1034 * @return The logarithm of x.
1038 long double log2l( long double x );
1041 double logb( double x );
1042 float logbf( float x );
1043 long double logbl( long double x );
1046 int ilogb( double x );
1047 int ilogbf( float x );
1048 int ilogbl( long double x );
1051 double log1p( double x );
1052 float log1pf( float x );
1053 long double log1pl( long double x );
1055 /** These functions increase x to the next whole number.
1056 * @param x The value to increase.
1057 * @return The next whole number after x.
1061 double ceil( double x );
1063 /** These functions increase x to the next whole number.
1064 * @param x The value to increase.
1065 * @return The next whole number after x.
1069 float ceilf( float x );
1071 /** These functions increase x to the next whole number.
1072 * @param x The value to increase.
1073 * @return The next whole number after x.
1077 long double ceill( long double x );
1079 /** These functions decrease x to the previous whole number.
1080 * @param x The value to decrease.
1081 * @return The previous whole number before x.
1085 double floor( double x );
1087 /** These functions decrease x to the previous whole number.
1088 * @param x The value to decrease.
1089 * @return The previous whole number before x.
1093 float floorf( float x );
1095 /** These functions decrease x to the previous whole number.
1096 * @param x The value to decrease.
1097 * @return The previous whole number before x.
1101 long double floorl( long double x );
1103 /** These functions compute the modulus of x and y.
1104 * @param x The value to take the modulus of.
1105 * @param y The modulus.
1106 * @return The value of x modulus y.
1110 double fmod( double x, double y );
1112 /** These functions compute the modulus of x and y.
1113 * @param x The value to take the modulus of.
1114 * @param y The modulus.
1115 * @return The value of x modulus y.
1119 float fmodf( float x, float y );
1121 /** These functions compute the modulus of x and y.
1122 * @param x The value to take the modulus of.
1123 * @param y The modulus.
1124 * @return The value of x modulus y.
1128 long double fmodl( long double x, long double y );
1131 double modf( double x, double * integer );
1132 float modff( float x, float * integer );
1133 long double modfl( long double x, long double * integer );
1135 /** These functions return x with the sign of y.
1136 * @param x The value to set the sign of.
1137 * @param y The value from which to read the sign.
1138 * @return The magnitude of x with the sign of y.
1142 double copysign( double x, double y );
1144 /** These functions return x with the sign of y.
1145 * @param x The value to set the sign of.
1146 * @param y The value from which to read the sign.
1147 * @return The magnitude of x with the sign of y.
1151 float copysignf( float x, float y );
1153 /** These functions return x with the sign of y.
1154 * @param x The value to set the sign of.
1155 * @param y The value from which to read the sign.
1156 * @return The magnitude of x with the sign of y.
1160 long double copysignl( long double x, long double y );
1163 double erf( double x );
1164 float erff( float x );
1165 long double erfl( long double x );
1168 double erfc( double x );
1169 float erfcf( float x );
1170 long double erfcl( long double x );
1173 double fdim( double x, double y );
1174 float fdimf( float x, float y );
1175 long double fdiml( long double x, long double y );
1178 double fma( double x, double y, double z );
1179 float fmaf( float x, float y, float z );
1180 long double fmal( long double x, long double y, long double z );
1182 /** These functions return the largest of the parameters.
1183 * @param x The first candidate.
1184 * @param y The second candidate.
1185 * @return The largest of x and y.
1189 double fmax( double x, double y );
1191 /** These functions return the largest of the parameters.
1192 * @param x The first candidate.
1193 * @param y The second candidate.
1194 * @return The largest of x and y.
1198 float fmaxf( float x, float y );
1200 /** These functions return the largest of the parameters.
1201 * @param x The first candidate.
1202 * @param y The second candidate.
1203 * @return The largest of x and y.
1207 long double fmaxl( long double x, long double y );
1209 /** These functions return the smallest of the parameters.
1210 * @param x The first candidate.
1211 * @param y The second candidate.
1212 * @return The smallest of x and y.
1216 double fmin( double x, double y );
1218 /** These functions return the smallest of the parameters.
1219 * @param x The first candidate.
1220 * @param y The second candidate.
1221 * @return The smallest of x and y.
1225 float fminf( float x, float y );
1227 /** These functions return the smallest of the parameters.
1228 * @param x The first candidate.
1229 * @param y The second candidate.
1230 * @return The smallest of x and y.
1234 long double fminl( long double x, long double y );
1237 long long llrint( double x );
1238 long long llrintf( float x );
1239 long long llrintl( long double x );
1240 long lrint( double x );
1241 long lrintf( float x );
1242 long lrintl( long double x );
1243 double rint( double x );
1244 float rintf( float x );
1245 long double rintl( long double x );
1247 /* TODO - These functions return their parameter correctly rounded according
1248 * to the current rounding settings.
1250 long long llround( double x );
1251 long long llroundf( float x );
1252 long long llroundl( long double x );
1253 long lround( double x );
1254 long lroundf( float x );
1255 long lroundl( long double x );
1256 double round( double x );
1257 float roundf( float x );
1258 long double roundl( long double x );
1260 /* TODO - These functions return their parameter with its decimal part
1263 double trunc( double x );
1264 float truncf( float x );
1265 long double truncl( long double x );
1267 double nearbyint( double x );
1268 float nearbyintf( float x );
1269 long double nearbyintl( long double x );
1271 double nextafter( double x, double y );
1272 float nextafterf( float x, float y );
1273 long double nextafterl( long double x, long double y );
1276 double nexttoward( double x, long double y );
1277 float nexttowardf( float x, long double y );
1278 long double nexttowardl( long double x, long double y );
1280 /* TODO - These functions divide parameter x by parameter y and return the
1283 double remainder( double x, double y );
1284 float remainderf( float x, float y );
1285 long double remainderl( long double x, long double y );
1288 double remquo( double x, double y, int * pquo );
1289 float remquof( float x, float y, int * pquo );
1290 long double remquol( long double x, long double y, int * pquo );
1293 double scalbn( double x, int ex );
1294 float scalbnf( float x, int ex );
1295 long double scalbnl( long double x, int ex );
1298 double scalbln( double x, long ex );
1299 float scalblnf( float x, long ex );
1300 long double scalblnl( long double x, long ex );
1303 double lgamma( double x );
1304 float lgammaf( float x );
1305 long double lgammal( long double x );
1308 double tgamma( double x );
1309 float tgammaf( float x );
1310 long double tgammal( long double x );
1313 double nan( const char *str );
1314 float nanf( const char *str );
1315 long double nanl( const char *str );
1317 #endif /* _MATH_H */