libphobos: Merge common version blocks using arch_any conditions
[official-gcc.git] / libphobos / libdruntime / core / stdc / math.d
blob8052ff7f344e0efef273e782171e70289a3a86c4
1 /**
2 * D header file for C99.
4 * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_math.h.html, _math.h)
6 * Copyright: Copyright Sean Kelly 2005 - 2012.
7 * License: Distributed under the
8 * $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
9 * (See accompanying file LICENSE)
10 * Authors: Sean Kelly
11 * Source: $(DRUNTIMESRC core/stdc/_math.d)
14 module core.stdc.math;
16 private import core.stdc.config;
18 version (OSX)
19 version = Darwin;
20 else version (iOS)
21 version = Darwin;
22 else version (TVOS)
23 version = Darwin;
24 else version (WatchOS)
25 version = Darwin;
27 version (ARM) version = ARM_Any;
28 version (AArch64) version = ARM_Any;
29 version (MIPS32) version = MIPS_Any;
30 version (MIPS64) version = MIPS_Any;
31 version (PPC) version = PPC_Any;
32 version (PPC64) version = PPC_Any;
33 version (S390) version = IBMZ_Any;
34 version (SPARC) version = SPARC_Any;
35 version (SPARC64) version = SPARC_Any;
36 version (SystemZ) version = IBMZ_Any;
37 version (X86) version = X86_Any;
38 version (X86_64) version = X86_Any;
40 extern (C):
41 @trusted: // All functions here operate on floating point and integer values only.
42 nothrow:
43 @nogc:
45 ///
46 alias float float_t;
47 ///
48 alias double double_t;
50 ///
51 enum double HUGE_VAL = double.infinity;
52 ///
53 enum double HUGE_VALF = float.infinity;
54 ///
55 enum double HUGE_VALL = real.infinity;
57 ///
58 enum float INFINITY = float.infinity;
59 ///
60 enum float NAN = float.nan;
62 version (FreeBSD)
64 ///
65 enum int FP_ILOGB0 = -int.max;
66 ///
67 enum int FP_ILOGBNAN = int.max;
69 else version (NetBSD)
71 ///
72 enum int FP_ILOGB0 = -int.max;
73 ///
74 enum int FP_ILOGBNAN = int.max;
76 else version (OpenBSD)
78 ///
79 enum int FP_ILOGB0 = -int.max;
80 ///
81 enum int FP_ILOGBNAN = int.max;
83 else version (DragonFlyBSD)
85 ///
86 enum int FP_ILOGB0 = -int.max;
87 ///
88 enum int FP_ILOGBNAN = int.max;
90 else version (CRuntime_Bionic)
92 ///
93 enum int FP_ILOGB0 = -int.max;
94 ///
95 enum int FP_ILOGBNAN = int.max;
97 else version (CRuntime_UClibc)
99 version (X86)
102 enum int FP_ILOGB0 = int.min;
104 enum int FP_ILOGBNAN = int.min;
106 else version (X86_64)
109 enum int FP_ILOGB0 = int.min;
111 enum int FP_ILOGBNAN = int.min;
113 else version (MIPS32)
116 enum int FP_ILOGB0 = -int.max;
118 enum int FP_ILOGBNAN = int.max;
120 else version (ARM)
123 enum int FP_ILOGB0 = -int.max;
125 enum int FP_ILOGBNAN = int.max;
127 else
129 static assert(false, "Architecture not supported.");
132 else version (CRuntime_Glibc)
134 version (X86_Any)
137 enum int FP_ILOGB0 = int.min;
139 enum int FP_ILOGBNAN = int.min;
141 else version (ARM_Any)
144 enum int FP_ILOGB0 = -int.max;
146 enum int FP_ILOGBNAN = int.max;
148 else version (MIPS_Any)
151 enum int FP_ILOGB0 = -int.max;
153 enum int FP_ILOGBNAN = int.max;
155 else version (PPC_Any)
158 enum int FP_ILOGB0 = -int.max;
160 enum int FP_ILOGBNAN = int.max;
162 else version (SPARC_Any)
165 enum int FP_ILOGB0 = -int.max;
167 enum int FP_ILOGBNAN = int.max;
169 else version (IBMZ_Any)
172 enum int FP_ILOGB0 = -int.max;
174 enum int FP_ILOGBNAN = int.max;
176 else
178 static assert(false, "Architecture not supported.");
181 else
184 enum int FP_ILOGB0 = int.min;
186 enum int FP_ILOGBNAN = int.min;
190 enum int MATH_ERRNO = 1;
192 enum int MATH_ERREXCEPT = 2;
194 enum int math_errhandling = MATH_ERRNO | MATH_ERREXCEPT;
196 version (none)
199 // these functions are all macros in C
202 //int fpclassify(real-floating x);
203 pure int fpclassify(float x);
204 pure int fpclassify(double x);
205 pure int fpclassify(real x);
207 //int isfinite(real-floating x);
208 pure int isfinite(float x);
209 pure int isfinite(double x);
210 pure int isfinite(real x);
212 //int isinf(real-floating x);
213 pure int isinf(float x);
214 pure int isinf(double x);
215 pure int isinf(real x);
217 //int isnan(real-floating x);
218 pure int isnan(float x);
219 pure int isnan(double x);
220 pure int isnan(real x);
222 //int isnormal(real-floating x);
223 pure int isnormal(float x);
224 pure int isnormal(double x);
225 pure int isnormal(real x);
227 //int signbit(real-floating x);
228 pure int signbit(float x);
229 pure int signbit(double x);
230 pure int signbit(real x);
232 //int isgreater(real-floating x, real-floating y);
233 pure int isgreater(float x, float y);
234 pure int isgreater(double x, double y);
235 pure int isgreater(real x, real y);
237 //int isgreaterequal(real-floating x, real-floating y);
238 pure int isgreaterequal(float x, float y);
239 pure int isgreaterequal(double x, double y);
240 pure int isgreaterequal(real x, real y);
242 //int isless(real-floating x, real-floating y);
243 pure int isless(float x, float y);
244 pure int isless(double x, double y);
245 pure int isless(real x, real y);
247 //int islessequal(real-floating x, real-floating y);
248 pure int islessequal(float x, float y);
249 pure int islessequal(double x, double y);
250 pure int islessequal(real x, real y);
252 //int islessgreater(real-floating x, real-floating y);
253 pure int islessgreater(float x, float y);
254 pure int islessgreater(double x, double y);
255 pure int islessgreater(real x, real y);
257 //int isunordered(real-floating x, real-floating y);
258 pure int isunordered(float x, float y);
259 pure int isunordered(double x, double y);
260 pure int isunordered(real x, real y);
263 version (CRuntime_DigitalMars)
265 enum
268 FP_NANS = 0,
270 FP_NANQ = 1,
272 FP_INFINITE = 2,
274 FP_NORMAL = 3,
276 FP_SUBNORMAL = 4,
278 FP_ZERO = 5,
280 FP_NAN = FP_NANQ,
282 FP_EMPTY = 6,
284 FP_UNSUPPORTED = 7,
287 enum
290 FP_FAST_FMA = 0,
292 FP_FAST_FMAF = 0,
294 FP_FAST_FMAL = 0,
297 pure uint __fpclassify_f(float x);
298 pure uint __fpclassify_d(double x);
299 pure uint __fpclassify_ld(real x);
301 extern (D)
303 //int fpclassify(real-floating x);
305 pure int fpclassify(float x) { return __fpclassify_f(x); }
307 pure int fpclassify(double x) { return __fpclassify_d(x); }
309 pure int fpclassify(real x)
311 return (real.sizeof == double.sizeof)
312 ? __fpclassify_d(x)
313 : __fpclassify_ld(x);
316 //int isfinite(real-floating x);
318 pure int isfinite(float x) { return fpclassify(x) >= FP_NORMAL; }
320 pure int isfinite(double x) { return fpclassify(x) >= FP_NORMAL; }
322 pure int isfinite(real x) { return fpclassify(x) >= FP_NORMAL; }
324 //int isinf(real-floating x);
326 pure int isinf(float x) { return fpclassify(x) == FP_INFINITE; }
328 pure int isinf(double x) { return fpclassify(x) == FP_INFINITE; }
330 pure int isinf(real x) { return fpclassify(x) == FP_INFINITE; }
332 //int isnan(real-floating x);
334 pure int isnan(float x) { return fpclassify(x) <= FP_NANQ; }
336 pure int isnan(double x) { return fpclassify(x) <= FP_NANQ; }
338 pure int isnan(real x) { return fpclassify(x) <= FP_NANQ; }
340 //int isnormal(real-floating x);
342 pure int isnormal(float x) { return fpclassify(x) == FP_NORMAL; }
344 pure int isnormal(double x) { return fpclassify(x) == FP_NORMAL; }
346 pure int isnormal(real x) { return fpclassify(x) == FP_NORMAL; }
348 //int signbit(real-floating x);
350 pure int signbit(float x) { return (cast(short*)&(x))[1] & 0x8000; }
352 pure int signbit(double x) { return (cast(short*)&(x))[3] & 0x8000; }
354 pure int signbit(real x)
356 return (real.sizeof == double.sizeof)
357 ? (cast(short*)&(x))[3] & 0x8000
358 : (cast(short*)&(x))[4] & 0x8000;
362 else version (CRuntime_Microsoft) // fully supported since MSVCRT 12 (VS 2013) only
364 version (all) // legacy stuff to be removed in the future
366 enum
368 _FPCLASS_SNAN = 1,
369 _FPCLASS_QNAN = 2,
370 _FPCLASS_NINF = 4,
371 _FPCLASS_NN = 8,
372 _FPCLASS_ND = 0x10,
373 _FPCLASS_NZ = 0x20,
374 _FPCLASS_PZ = 0x40,
375 _FPCLASS_PD = 0x80,
376 _FPCLASS_PN = 0x100,
377 _FPCLASS_PINF = 0x200,
380 //deprecated("Please use the standard C99 function copysignf() instead.")
381 pure float _copysignf(float x, float s);
383 //deprecated("_chgsignf(x) is a non-standard MS extension. Please consider using -x instead.")
384 pure float _chgsignf(float x);
386 version (Win64) // not available in 32-bit runtimes
388 //deprecated("Please use the standard C99 function isfinite() instead.")
389 pure int _finitef(float x);
391 //deprecated("Please use the standard C99 function isnan() instead.")
392 pure int _isnanf(float x);
394 //deprecated("Please use the standard C99 function fpclassify() instead.")
395 pure int _fpclassf(float x);
398 //deprecated("Please use the standard C99 function copysign() instead.")
399 pure double _copysign(double x, double s);
401 //deprecated("_chgsign(x) is a non-standard MS extension. Please consider using -x instead.")
402 pure double _chgsign(double x);
404 //deprecated("Please use the standard C99 function isfinite() instead.")
405 pure int _finite(double x);
407 //deprecated("Please use the standard C99 function isnan() instead.")
408 pure int _isnan(double x);
410 //deprecated("Please use the standard C99 function fpclassify() instead.")
411 pure int _fpclass(double x);
414 enum
417 FP_SUBNORMAL = -2,
419 FP_NORMAL = -1,
421 FP_ZERO = 0,
423 FP_INFINITE = 1,
425 FP_NAN = 2,
428 pure private short _fdclass(float x);
429 pure private short _dclass(double x);
431 pure private int _fdsign(float x);
432 pure private int _dsign(double x);
434 extern(D)
436 //int fpclassify(real-floating x);
438 pure int fpclassify()(float x) { return _fdclass(x); }
440 pure int fpclassify()(double x) { return _dclass(x); }
442 pure int fpclassify()(real x)
444 static if (real.sizeof == double.sizeof)
445 return _dclass(cast(double) x);
446 else
447 static assert(false, "fpclassify(real) not supported by MS C runtime");
450 //int isfinite(real-floating x);
452 pure int isfinite()(float x) { return fpclassify(x) <= 0; }
454 pure int isfinite()(double x) { return fpclassify(x) <= 0; }
456 pure int isfinite()(real x) { return fpclassify(x) <= 0; }
458 //int isinf(real-floating x);
460 pure int isinf()(float x) { return fpclassify(x) == FP_INFINITE; }
462 pure int isinf()(double x) { return fpclassify(x) == FP_INFINITE; }
464 pure int isinf()(real x) { return fpclassify(x) == FP_INFINITE; }
466 //int isnan(real-floating x);
467 version (none) // requires MSVCRT 12+ (VS 2013)
470 pure int isnan(float x) { return fpclassify(x) == FP_NAN; }
472 pure int isnan(double x) { return fpclassify(x) == FP_NAN; }
474 pure int isnan(real x) { return fpclassify(x) == FP_NAN; }
476 else // for backward compatibility with older runtimes
479 pure int isnan(float x) { version (Win64) return _isnanf(x); else return _isnan(cast(double) x); }
481 pure int isnan(double x) { return _isnan(x); }
483 pure int isnan(real x) { return _isnan(cast(double) x); }
486 //int isnormal(real-floating x);
488 pure int isnormal()(float x) { return fpclassify(x) == FP_NORMAL; }
490 pure int isnormal()(double x) { return fpclassify(x) == FP_NORMAL; }
492 pure int isnormal()(real x) { return fpclassify(x) == FP_NORMAL; }
494 //int signbit(real-floating x);
496 pure int signbit()(float x) { return _fdsign(x); }
498 pure int signbit()(double x) { return _dsign(x); }
500 pure int signbit()(real x)
502 static if (real.sizeof == double.sizeof)
503 return _dsign(cast(double) x);
504 else
505 return (cast(short*)&(x))[4] & 0x8000;
509 else version (CRuntime_Glibc)
511 enum
514 FP_NAN,
516 FP_INFINITE,
518 FP_ZERO,
520 FP_SUBNORMAL,
522 FP_NORMAL,
525 enum
528 FP_FAST_FMA = 0,
530 FP_FAST_FMAF = 0,
532 FP_FAST_FMAL = 0,
535 pure int __fpclassifyf(float x);
536 pure int __fpclassify(double x);
537 pure int __fpclassifyl(real x);
539 pure int __finitef(float x);
540 pure int __finite(double x);
541 pure int __finitel(real x);
543 pure int __isinff(float x);
544 pure int __isinf(double x);
545 pure int __isinfl(real x);
547 pure int __isnanf(float x);
548 pure int __isnan(double x);
549 pure int __isnanl(real x);
551 pure int __signbitf(float x);
552 pure int __signbit(double x);
553 pure int __signbitl(real x);
555 extern (D)
557 //int fpclassify(real-floating x);
559 pure int fpclassify(float x) { return __fpclassifyf(x); }
561 pure int fpclassify(double x) { return __fpclassify(x); }
563 pure int fpclassify(real x)
565 return (real.sizeof == double.sizeof)
566 ? __fpclassify(x)
567 : __fpclassifyl(x);
570 //int isfinite(real-floating x);
572 pure int isfinite(float x) { return __finitef(x); }
574 pure int isfinite(double x) { return __finite(x); }
576 pure int isfinite(real x)
578 return (real.sizeof == double.sizeof)
579 ? __finite(x)
580 : __finitel(x);
583 //int isinf(real-floating x);
585 pure int isinf(float x) { return __isinff(x); }
587 pure int isinf(double x) { return __isinf(x); }
589 pure int isinf(real x)
591 return (real.sizeof == double.sizeof)
592 ? __isinf(x)
593 : __isinfl(x);
596 //int isnan(real-floating x);
598 pure int isnan(float x) { return __isnanf(x); }
600 pure int isnan(double x) { return __isnan(x); }
602 pure int isnan(real x)
604 return (real.sizeof == double.sizeof)
605 ? __isnan(x)
606 : __isnanl(x);
609 //int isnormal(real-floating x);
611 pure int isnormal(float x) { return fpclassify(x) == FP_NORMAL; }
613 pure int isnormal(double x) { return fpclassify(x) == FP_NORMAL; }
615 pure int isnormal(real x) { return fpclassify(x) == FP_NORMAL; }
617 //int signbit(real-floating x);
619 pure int signbit(float x) { return __signbitf(x); }
621 pure int signbit(double x) { return __signbit(x); }
623 pure int signbit(real x)
625 return (real.sizeof == double.sizeof)
626 ? __signbit(x)
627 : __signbitl(x);
631 else version (CRuntime_Musl)
633 enum
636 FP_NAN,
638 FP_INFINITE,
640 FP_ZERO,
642 FP_SUBNORMAL,
644 FP_NORMAL,
647 enum
650 FP_FAST_FMA = 0,
652 FP_FAST_FMAF = 0,
654 FP_FAST_FMAL = 0,
657 pure {
658 int __fpclassifyf(float x);
659 int __fpclassify(double x);
660 int __fpclassifyl(real x);
662 int __signbitf(float x);
663 int __signbit(double x);
664 int __signbitl(real x);
667 extern (D) pure
669 //int fpclassify(real-floating x);
671 int fpclassify(float x) { return __fpclassifyf(x); }
673 int fpclassify(double x) { return __fpclassify(x); }
675 int fpclassify(real x)
677 return (real.sizeof == double.sizeof)
678 ? __fpclassify(x)
679 : __fpclassifyl(x);
681 private uint __FLOAT_BITS(float __f)
683 union __u_t {
684 float __f;
685 uint __i;
687 __u_t __u;
688 __u.__f = __f;
689 return __u.__i;
691 private ulong __DOUBLE_BITS(double __f)
693 union __u_t {
694 double __f;
695 ulong __i;
697 __u_t __u;
698 __u.__f = __f;
699 return __u.__i;
702 //int isfinite(real-floating x);
704 int isfinite(float x) { return (__FLOAT_BITS(x) & 0x7fffffff) < 0x7f800000; }
706 int isfinite(double x) { return (__DOUBLE_BITS(x) & -1UL>>1) < 0x7ffUL<<52; }
708 int isfinite(real x)
710 return (real.sizeof == double.sizeof)
711 ? isfinite(cast(double)x)
712 : __fpclassifyl(x) > FP_INFINITE;
715 //int isinf(real-floating x);
717 int isinf(float x) { return (__FLOAT_BITS(x) & 0x7fffffff) == 0x7f800000; }
719 int isinf(double x) { return (__DOUBLE_BITS(x) & -1UL>>1) == 0x7ffUL<<52; }
721 int isinf(real x)
723 return (real.sizeof == double.sizeof)
724 ? isinf(cast(double)x)
725 : __fpclassifyl(x) == FP_INFINITE;
728 //int isnan(real-floating x);
730 int isnan(float x) { return (__FLOAT_BITS(x) & 0x7fffffff) > 0x7f800000; }
732 int isnan(double x) { return (__DOUBLE_BITS(x) & -1UL>>1) > 0x7ffUL<<52; }
734 int isnan(real x)
736 return (real.sizeof == double.sizeof)
737 ? isnan(cast(double)x)
738 : __fpclassifyl(x) == FP_NAN;
741 //int isnormal(real-floating x);
743 int isnormal(float x) { return fpclassify(x) == FP_NORMAL; }
745 int isnormal(double x) { return fpclassify(x) == FP_NORMAL; }
747 int isnormal(real x) { return fpclassify(x) == FP_NORMAL; }
749 //int signbit(real-floating x);
751 int signbit(float x) { return __signbitf(x); }
753 int signbit(double x) { return __signbit(x); }
755 int signbit(real x)
757 return (real.sizeof == double.sizeof)
758 ? __signbit(x)
759 : __signbitl(x);
763 else version (CRuntime_UClibc)
765 enum
768 FP_NAN,
770 FP_INFINITE,
772 FP_ZERO,
774 FP_SUBNORMAL,
776 FP_NORMAL,
779 enum
782 FP_FAST_FMA = 0,
784 FP_FAST_FMAF = 0,
786 FP_FAST_FMAL = 0,
789 int __fpclassifyf(float x);
790 int __fpclassify(double x);
791 int __fpclassifyl(real x);
793 int __finitef(float x);
794 int __finite(double x);
795 int __finitel(real x);
797 int __isinff(float x);
798 int __isinf(double x);
799 int __isinfl(real x);
801 int __isnanf(float x);
802 int __isnan(double x);
803 int __isnanl(real x);
805 int __signbitf(float x);
806 int __signbit(double x);
807 int __signbitl(real x);
809 extern (D)
812 int fpclassify(float x) { return __fpclassifyf(x); }
814 int fpclassify(double x) { return __fpclassify(x); }
816 int fpclassify(real x)
818 return (real.sizeof == double.sizeof)
819 ? __fpclassify(x)
820 : __fpclassifyl(x);
824 int isfinite(float x) { return __finitef(x); }
826 int isfinite(double x) { return __finite(x); }
828 int isfinite(real x)
830 return (real.sizeof == double.sizeof)
831 ? __finite(x)
832 : __finitel(x);
836 int isinf(float x) { return __isinff(x); }
838 int isinf(double x) { return __isinf(x); }
840 int isinf(real x)
842 return (real.sizeof == double.sizeof)
843 ? __isinf(x)
844 : __isinfl(x);
848 int isnan(float x) { return __isnanf(x); }
850 int isnan(double x) { return __isnan(x); }
852 int isnan(real x)
854 return (real.sizeof == double.sizeof)
855 ? __isnan(x)
856 : __isnanl(x);
860 int isnormal(float x) { return fpclassify(x) == FP_NORMAL; }
862 int isnormal(double x) { return fpclassify(x) == FP_NORMAL; }
864 int isnormal(real x) { return fpclassify(x) == FP_NORMAL; }
867 int signbit(float x) { return __signbitf(x); }
869 int signbit(double x) { return __signbit(x); }
871 int signbit(real x)
873 return (real.sizeof == double.sizeof)
874 ? __signbit(x)
875 : __signbitl(x);
879 else version (MinGW)
881 enum
884 FP_NAN = 0x0100,
886 FP_NORMAL = 0x0400,
888 FP_INFINITE = FP_NAN | FP_NORMAL,
890 FP_ZERO = 0x0400,
892 FP_SUBNORMAL = FP_NORMAL | FP_ZERO
895 pure int __fpclassifyf(float x);
896 pure int __fpclassify(double x);
897 pure int __fpclassifyl(real x);
899 pure int __isnanf(float x);
900 pure int __isnan(double x);
901 pure int __isnanl(real x);
903 pure int __signbitf(float x);
904 pure int __signbit(double x);
905 pure int __signbitl(real x);
907 extern (D)
909 //int fpclassify(real-floating x);
911 pure int fpclassify(float x) { return __fpclassifyf(x); }
913 pure int fpclassify(double x) { return __fpclassify(x); }
915 pure int fpclassify(real x)
917 return (real.sizeof == double.sizeof)
918 ? __fpclassify(x)
919 : __fpclassifyl(x);
922 //int isfinite(real-floating x);
924 pure int isfinite(float x) { return (fpclassify(x) & FP_NORMAL) == 0; }
926 pure int isfinite(double x) { return (fpclassify(x) & FP_NORMAL) == 0; }
928 pure int isfinite(real x) { return (fpclassify(x) & FP_NORMAL) == 0; }
930 //int isinf(real-floating x);
932 pure int isinf(float x) { return fpclassify(x) == FP_INFINITE; }
934 pure int isinf(double x) { return fpclassify(x) == FP_INFINITE; }
936 pure int isinf(real x) { return fpclassify(x) == FP_INFINITE; }
938 //int isnan(real-floating x);
940 pure int isnan(float x) { return __isnanf(x); }
942 pure int isnan(double x) { return __isnan(x); }
944 pure int isnan(real x)
946 return (real.sizeof == double.sizeof)
947 ? __isnan(x)
948 : __isnanl(x);
951 //int isnormal(real-floating x);
953 int isnormal(float x) { return fpclassify(x) == FP_NORMAL; }
955 int isnormal(double x) { return fpclassify(x) == FP_NORMAL; }
957 int isnormal(real x) { return fpclassify(x) == FP_NORMAL; }
959 //int signbit(real-floating x);
961 int signbit(float x) { return __signbitf(x); }
963 int signbit(double x) { return __signbit(x); }
965 int signbit(real x)
967 return (real.sizeof == double.sizeof)
968 ? __signbit(x)
969 : __signbitl(x);
973 else version (Darwin)
975 enum
978 FP_NAN = 1,
980 FP_INFINITE = 2,
982 FP_ZERO = 3,
984 FP_NORMAL = 4,
986 FP_SUBNORMAL = 5,
989 enum
992 FP_FAST_FMA = 0,
994 FP_FAST_FMAF = 0,
996 FP_FAST_FMAL = 0,
999 pure int __fpclassifyf(float x);
1000 pure int __fpclassifyd(double x);
1002 pure int __isfinitef(float x);
1003 pure int __isfinited(double x);
1005 pure int __isinff(float x);
1006 pure int __isinfd(double x);
1008 pure int __isnanf(float x);
1009 pure int __isnand(double x);
1011 // __isnormal family exists, but iOS implementation returns wrong results
1012 // for subnormals
1014 pure int __signbitf(float x);
1015 pure int __signbitd(double x);
1016 pure int __signbitl(real x);
1018 // Support of OSX < 10.8 needs legacy function names without "l" suffix
1019 // with exception of __signbitl. Otherwise could use else version like
1020 // other Darwins
1021 version (OSX)
1023 pure int __fpclassify(real x);
1024 pure int __isfinite(real x);
1025 pure int __isinf(real x);
1026 pure int __isnan(real x);
1027 alias __fpclassifyl = __fpclassify;
1028 alias __isfinitel = __isfinite;
1029 alias __isinfl = __isinf;
1030 alias __isnanl = __isnan;
1032 else
1034 // Available OSX >= 10.8, iOS >= 6.0, all TVOS and WatchOS
1035 pure int __fpclassifyl(real x);
1036 pure int __isfinitel(real x);
1037 pure int __isinfl(real x);
1038 pure int __isnanl(real x);
1041 extern (D)
1043 //int fpclassify(real-floating x);
1045 pure int fpclassify(float x) { return __fpclassifyf(x); }
1047 pure int fpclassify(double x) { return __fpclassifyd(x); }
1049 pure int fpclassify(real x) { return __fpclassifyl(x); }
1051 //int isfinite(real-floating x);
1053 pure int isfinite(float x) { return __isfinitef(x); }
1055 pure int isfinite(double x) { return __isfinited(x); }
1057 pure int isfinite(real x) { return __isfinitel(x); }
1059 //int isinf(real-floating x);
1061 pure int isinf(float x) { return __isinff(x); }
1063 pure int isinf(double x) { return __isinfd(x); }
1065 pure int isinf(real x) { return __isinfl(x); }
1067 //int isnan(real-floating x);
1069 pure int isnan(float x) { return __isnanf(x); }
1071 pure int isnan(double x) { return __isnand(x); }
1073 pure int isnan(real x) { return __isnanl(x); }
1075 //int isnormal(real-floating x);
1077 pure int isnormal(float x) { return fpclassify(x) == FP_NORMAL; }
1079 pure int isnormal(double x) { return fpclassify(x) == FP_NORMAL; }
1081 pure int isnormal(real x) { return fpclassify(x) == FP_NORMAL; }
1083 //int signbit(real-floating x);
1085 pure int signbit(float x) { return __signbitf(x); }
1087 pure int signbit(double x) { return __signbitd(x); }
1089 pure int signbit(real x) { return __signbitl(x); }
1092 else version (FreeBSD)
1094 enum
1097 FP_INFINITE = 0x01,
1099 FP_NAN = 0x02,
1101 FP_NORMAL = 0x04,
1103 FP_SUBNORMAL = 0x08,
1105 FP_ZERO = 0x10,
1108 enum
1111 FP_FAST_FMA = 0,
1113 FP_FAST_FMAF = 0,
1115 FP_FAST_FMAL = 0,
1118 pure int __fpclassifyd(double);
1119 pure int __fpclassifyf(float);
1120 pure int __fpclassifyl(real);
1121 pure int __isfinitef(float);
1122 pure int __isfinite(double);
1123 pure int __isfinitel(real);
1124 pure int __isinff(float);
1125 pure int __isinfl(real);
1126 pure int __isnanl(real);
1127 pure int __isnormalf(float);
1128 pure int __isnormal(double);
1129 pure int __isnormall(real);
1130 pure int __signbit(double);
1131 pure int __signbitf(float);
1132 pure int __signbitl(real);
1134 extern (D)
1136 //int fpclassify(real-floating x);
1138 pure int fpclassify(float x) { return __fpclassifyf(x); }
1140 pure int fpclassify(double x) { return __fpclassifyd(x); }
1142 pure int fpclassify(real x) { return __fpclassifyl(x); }
1144 //int isfinite(real-floating x);
1146 pure int isfinite(float x) { return __isfinitef(x); }
1148 pure int isfinite(double x) { return __isfinite(x); }
1150 pure int isfinite(real x) { return __isfinitel(x); }
1152 //int isinf(real-floating x);
1154 pure int isinf(float x) { return __isinff(x); }
1156 pure int isinf(double x) { return __isinfl(x); }
1158 pure int isinf(real x) { return __isinfl(x); }
1160 //int isnan(real-floating x);
1162 pure int isnan(float x) { return __isnanl(x); }
1164 pure int isnan(double x) { return __isnanl(x); }
1166 pure int isnan(real x) { return __isnanl(x); }
1168 //int isnormal(real-floating x);
1170 pure int isnormal(float x) { return __isnormalf(x); }
1172 pure int isnormal(double x) { return __isnormal(x); }
1174 pure int isnormal(real x) { return __isnormall(x); }
1176 //int signbit(real-floating x);
1178 pure int signbit(float x) { return __signbitf(x); }
1180 pure int signbit(double x) { return __signbit(x); }
1182 pure int signbit(real x) { return __signbit(x); }
1185 else version (OpenBSD)
1187 enum
1190 FP_INFINITE = 0x01,
1192 FP_NAN = 0x02,
1194 FP_NORMAL = 0x04,
1196 FP_SUBNORMAL = 0x08,
1198 FP_ZERO = 0x10,
1201 enum
1204 FP_FAST_FMA = 1,
1206 FP_FAST_FMAF = 1,
1208 FP_FAST_FMAL = 1,
1211 pure int __fpclassifyd(double);
1212 pure int __fpclassifyf(float);
1213 pure int __fpclassifyl(real);
1214 pure int __isfinitef(float);
1215 pure int __isfinite(double);
1216 pure int __isfinitel(real);
1217 pure int __isinff(float);
1218 pure int __isinfl(real);
1219 pure int __isnanl(real);
1220 pure int __isnormalf(float);
1221 pure int __isnormal(double);
1222 pure int __isnormall(real);
1223 pure int __signbit(double);
1224 pure int __signbitf(float);
1225 pure int __signbitl(real);
1227 extern (D)
1229 //int fpclassify(real-floating x);
1231 pure int fpclassify(float x) { return __fpclassifyf(x); }
1233 pure int fpclassify(double x) { return __fpclassifyd(x); }
1235 pure int fpclassify(real x) { return __fpclassifyl(x); }
1237 //int isfinite(real-floating x);
1239 pure int isfinite(float x) { return __isfinitef(x); }
1241 pure int isfinite(double x) { return __isfinite(x); }
1243 pure int isfinite(real x) { return __isfinitel(x); }
1245 //int isinf(real-floating x);
1247 pure int isinf(float x) { return __isinff(x); }
1249 pure int isinf(double x) { return __isinfl(x); }
1251 pure int isinf(real x) { return __isinfl(x); }
1253 //int isnan(real-floating x);
1255 pure int isnan(float x) { return __isnanl(x); }
1257 pure int isnan(double x) { return __isnanl(x); }
1259 pure int isnan(real x) { return __isnanl(x); }
1261 //int isnormal(real-floating x);
1263 pure int isnormal(float x) { return __isnormalf(x); }
1265 pure int isnormal(double x) { return __isnormal(x); }
1267 pure int isnormal(real x) { return __isnormall(x); }
1269 //int signbit(real-floating x);
1271 pure int signbit(float x) { return __signbitf(x); }
1273 pure int signbit(double x) { return __signbit(x); }
1275 pure int signbit(real x) { return __signbit(x); }
1278 else version (NetBSD)
1280 enum
1283 FP_INFINITE = 0,
1285 FP_NAN = 1,
1287 FP_NORMAL = 2,
1289 FP_SUBNORMAL = 3,
1291 FP_ZERO = 4,
1294 enum
1297 FP_FAST_FMA = 0,
1299 FP_FAST_FMAF = 0,
1301 FP_FAST_FMAL = 0,
1304 pure uint __fpclassifyf(float x);
1305 pure uint __fpclassifyd(double x);
1306 pure uint __fpclassifyl(real x);
1308 extern (D)
1310 //int fpclassify(real-floating x);
1312 pure int fpclassify(float x) { return __fpclassifyf(x); }
1314 pure int fpclassify(double x) { return __fpclassifyd(x); }
1316 pure int fpclassify(real x)
1318 return (real.sizeof == double.sizeof)
1319 ? __fpclassifyd(x)
1320 : __fpclassifyl(x);
1323 //int isfinite(real-floating x);
1325 pure int isfinite(float x) { return fpclassify(x) >= FP_NORMAL; }
1327 pure int isfinite(double x) { return fpclassify(x) >= FP_NORMAL; }
1329 pure int isfinite(real x) { return fpclassify(x) >= FP_NORMAL; }
1331 //int isinf(real-floating x);
1333 pure int isinf(float x) { return fpclassify(x) == FP_INFINITE; }
1335 pure int isinf(double x) { return fpclassify(x) == FP_INFINITE; }
1337 pure int isinf(real x) { return fpclassify(x) == FP_INFINITE; }
1339 //int isnan(real-floating x);
1341 pure int isnan(float x) { return fpclassify(x) == FP_NAN; }
1343 pure int isnan(double x) { return fpclassify(x) == FP_NAN; }
1345 pure int isnan(real x) { return fpclassify(x) == FP_NAN; }
1347 //int isnormal(real-floating x);
1349 pure int isnormal(float x) { return fpclassify(x) == FP_NORMAL; }
1351 pure int isnormal(double x) { return fpclassify(x) == FP_NORMAL; }
1353 pure int isnormal(real x) { return fpclassify(x) == FP_NORMAL; }
1355 //int signbit(real-floating x);
1357 pure int signbit(float x) { return (cast(short*)&(x))[1] & 0x8000; }
1359 pure int signbit(double x) { return (cast(short*)&(x))[3] & 0x8000; }
1361 pure int signbit(real x)
1363 return (real.sizeof == double.sizeof)
1364 ? (cast(short*)&(x))[3] & 0x8000
1365 : (cast(short*)&(x))[4] & 0x8000;
1369 else version (DragonFlyBSD)
1371 enum
1373 FP_INFINITE = 0x01,
1374 FP_NAN = 0x02,
1375 FP_NORMAL = 0x04,
1376 FP_SUBNORMAL = 0x08,
1377 FP_ZERO = 0x10,
1381 * /usr/include/math.h : martynas@openbsd believes only F version is true.
1382 enum FP_FAST_FMA = 1;
1383 enum FP_FAST_FMAL = 1;
1385 enum FP_FAST_FMAF = 1;
1387 pure int __fpclassifyd(double);
1388 pure int __fpclassifyf(float);
1389 pure int __fpclassifyl(real);
1390 pure int __isfinitef(float);
1391 pure int __isfinite(double);
1392 pure int __isfinitel(real);
1393 pure int __isinff(float);
1394 pure int __isinf(double);
1395 pure int __isinfl(real);
1396 pure int __isnanf(float);
1397 pure int __isnan(double);
1398 pure int __isnanl(real);
1399 pure int __isnormalf(float);
1400 pure int __isnormal(double);
1401 pure int __isnormall(real);
1402 pure int __signbit(double);
1403 pure int __signbitf(float);
1404 pure int __signbitl(real);
1406 extern (D)
1408 pure int fpclassify(float x) { return __fpclassifyf(x); }
1409 pure int fpclassify(double x) { return __fpclassifyd(x); }
1410 pure int fpclassify(real x) { return __fpclassifyl(x); }
1412 pure int isfinite(float x) { return __isfinitef(x); }
1413 pure int isfinite(double x) { return __isfinite(x); }
1414 pure int isfinite(real x) { return __isfinitel(x); }
1416 pure int isinf(float x) { return __isinff(x); }
1417 pure int isinf(double x) { return __isinf(x); }
1418 pure int isinf(real x) { return __isinfl(x); }
1420 pure int isnan(float x) { return __isnanf(x); }
1421 pure int isnan(double x) { return __isnan(x); }
1422 pure int isnan(real x) { return __isnanl(x); }
1424 pure int isnormal(float x) { return __isnormalf(x); }
1425 pure int isnormal(double x) { return __isnormal(x); }
1426 pure int isnormal(real x) { return __isnormall(x); }
1428 pure int signbit(float x) { return __signbitf(x); }
1429 pure int signbit(double x) { return __signbit(x); }
1430 pure int signbit(real x) { return __signbitl(x); }
1433 else version (Solaris)
1435 pure int __isnanf(float x);
1436 pure int __isnan(double x);
1437 pure int __isnanl(real x);
1439 extern (D)
1441 //int isnan(real-floating x);
1443 pure int isnan(float x) { return __isnanf(x); }
1445 pure int isnan(double x) { return __isnan(x); }
1447 pure int isnan(real x)
1449 return (real.sizeof == double.sizeof)
1450 ? __isnan(x)
1451 : __isnanl(x);
1455 else version (CRuntime_Bionic)
1457 enum
1460 FP_INFINITE = 0x01,
1462 FP_NAN = 0x02,
1464 FP_NORMAL = 0x04,
1466 FP_SUBNORMAL = 0x08,
1468 FP_ZERO = 0x10,
1472 enum FP_FAST_FMAF;
1474 pure int __fpclassifyd(double);
1475 pure int __fpclassifyf(float);
1476 pure int __fpclassifyl(real);
1478 pure int __isfinitef(float);
1479 pure int __isfinite(double);
1480 pure int __isfinitel(real);
1482 pure int __isinff(float);
1483 pure int __isinf(double);
1484 pure int __isinfl(real);
1486 pure int isnanf(float);
1487 pure int isnan(double);
1488 pure int __isnanl(real);
1490 pure int __isnormalf(float);
1491 pure int __isnormal(double);
1492 pure int __isnormall(real);
1494 pure int __signbit(double);
1495 pure int __signbitf(float);
1496 pure int __signbitl(real);
1498 extern (D)
1500 //int fpclassify(real-floating x);
1502 pure int fpclassify(float x) { return __fpclassifyf(x); }
1504 pure int fpclassify(double x) { return __fpclassifyd(x); }
1506 pure int fpclassify(real x) { return __fpclassifyl(x); }
1508 //int isfinite(real-floating x);
1510 pure int isfinite(float x) { return __isfinitef(x); }
1512 pure int isfinite(double x) { return __isfinite(x); }
1514 pure int isfinite(real x) { return __isfinitel(x); }
1516 //int isinf(real-floating x);
1518 pure int isinf(float x) { return __isinff(x); }
1520 pure int isinf(double x) { return __isinf(x); }
1522 pure int isinf(real x) { return __isinfl(x); }
1524 //int isnan(real-floating x);
1526 pure int isnan(float x) { return isnanf(x); }
1528 pure int isnan(real x) { return __isnanl(x); }
1530 //int isnormal(real-floating x);
1532 pure int isnormal(float x) { return __isnormalf(x); }
1534 pure int isnormal(double x) { return __isnormal(x); }
1536 pure int isnormal(real x) { return __isnormall(x); }
1538 //int signbit(real-floating x);
1540 pure int signbit(float x) { return __signbitf(x); }
1542 pure int signbit(double x) { return __signbit(x); }
1544 pure int signbit(real x) { return __signbitl(x); }
1548 extern (D)
1550 //int isgreater(real-floating x, real-floating y);
1552 pure int isgreater(float x, float y) { return x > y && !isunordered(x, y); }
1554 pure int isgreater(double x, double y) { return x > y && !isunordered(x, y); }
1556 pure int isgreater(real x, real y) { return x > y && !isunordered(x, y); }
1558 //int isgreaterequal(real-floating x, real-floating y);
1560 pure int isgreaterequal(float x, float y) { return x >= y && !isunordered(x, y); }
1562 pure int isgreaterequal(double x, double y) { return x >= y && !isunordered(x, y); }
1564 pure int isgreaterequal(real x, real y) { return x >= y && !isunordered(x, y); }
1566 //int isless(real-floating x, real-floating y);
1568 pure int isless(float x, float y) { return x < y && !isunordered(x, y); }
1570 pure int isless(double x, double y) { return x < y && !isunordered(x, y); }
1572 pure int isless(real x, real y) { return x < y && !isunordered(x, y); }
1574 //int islessequal(real-floating x, real-floating y);
1576 pure int islessequal(float x, float y) { return x <= y && !isunordered(x, y); }
1578 pure int islessequal(double x, double y) { return x <= y && !isunordered(x, y); }
1580 pure int islessequal(real x, real y) { return x <= y && !isunordered(x, y); }
1582 //int islessgreater(real-floating x, real-floating y);
1584 pure int islessgreater(float x, float y) { return x != y && !isunordered(x, y); }
1586 pure int islessgreater(double x, double y) { return x != y && !isunordered(x, y); }
1588 pure int islessgreater(real x, real y) { return x != y && !isunordered(x, y); }
1590 //int isunordered(real-floating x, real-floating y);
1592 pure int isunordered(float x, float y) { return isnan(x) || isnan(y); }
1594 pure int isunordered(double x, double y) { return isnan(x) || isnan(y); }
1596 pure int isunordered(real x, real y) { return isnan(x) || isnan(y); }
1599 /* MS define some functions inline.
1600 * Additionally, their *l functions work with a 64-bit long double and are thus
1601 * useless for 80-bit D reals. So we use our own wrapper implementations working
1602 * internally with reduced 64-bit precision.
1603 * This also enables relaxing real to 64-bit double.
1605 version (CRuntime_Microsoft) // fully supported since MSVCRT 12 (VS 2013) only
1608 double acos(double x);
1610 float acosf(float x);
1612 extern(D) real acosl()(real x) { return acos(cast(double) x); }
1615 double asin(double x);
1617 float asinf(float x);
1619 extern(D) real asinl()(real x) { return asin(cast(double) x); }
1622 pure double atan(double x);
1624 pure float atanf(float x);
1626 pure extern(D) real atanl()(real x) { return atan(cast(double) x); }
1629 double atan2(double y, double x);
1631 float atan2f(float y, float x);
1633 extern(D) real atan2l()(real y, real x) { return atan2(cast(double) y, cast(double) x); }
1636 pure double cos(double x);
1638 pure float cosf(float x);
1640 extern(D) pure real cosl()(real x) { return cos(cast(double) x); }
1643 pure double sin(double x);
1645 pure float sinf(float x);
1647 extern(D) pure real sinl()(real x) { return sin(cast(double) x); }
1650 pure double tan(double x);
1652 pure float tanf(float x);
1654 extern(D) pure real tanl()(real x) { return tan(cast(double) x); }
1657 double acosh(double x);
1659 float acoshf(float x);
1661 extern(D) real acoshl()(real x) { return acosh(cast(double) x); }
1664 pure double asinh(double x);
1666 pure float asinhf(float x);
1668 pure extern(D) real asinhl()(real x) { return asinh(cast(double) x); }
1671 double atanh(double x);
1673 float atanhf(float x);
1675 extern(D) real atanhl()(real x) { return atanh(cast(double) x); }
1678 double cosh(double x);
1680 float coshf(float x);
1682 extern(D) real coshl()(real x) { return cosh(cast(double) x); }
1685 double sinh(double x);
1687 float sinhf(float x);
1689 extern(D) real sinhl()(real x) { return sinh(cast(double) x); }
1692 pure double tanh(double x);
1694 pure float tanhf(float x);
1696 extern(D) pure real tanhl()(real x) { return tanh(cast(double) x); }
1699 double exp(double x);
1701 float expf(float x);
1703 extern(D) real expl()(real x) { return exp(cast(double) x); }
1706 double exp2(double x);
1708 float exp2f(float x);
1710 extern(D) real exp2l()(real x) { return exp2(cast(double) x); }
1713 double expm1(double x);
1715 float expm1f(float x);
1717 extern(D) real expm1l()(real x) { return expm1(cast(double) x); }
1720 pure double frexp(double value, int* exp);
1722 extern(D) pure float frexpf()(float value, int* exp) { return cast(float) frexp(value, exp); }
1724 extern(D) pure real frexpl()(real value, int* exp) { return frexp(cast(double) value, exp); }
1727 int ilogb(double x);
1729 int ilogbf(float x);
1731 extern(D) int ilogbl()(real x) { return ilogb(cast(double) x); }
1734 double ldexp(double x, int exp);
1736 extern(D) float ldexpf()(float x, int exp) { return cast(float) ldexp(x, exp); }
1738 extern(D) real ldexpl()(real x, int exp) { return ldexp(cast(double) x, exp); }
1741 double log(double x);
1743 float logf(float x);
1745 extern(D) real logl()(real x) { return log(cast(double) x); }
1748 double log10(double x);
1750 float log10f(float x);
1752 extern(D) real log10l()(real x) { return log10(cast(double) x); }
1755 double log1p(double x);
1757 float log1pf(float x);
1759 extern(D) real log1pl()(real x) { return log1p(cast(double) x); }
1762 double log2(double x);
1764 float log2f(float x);
1766 extern(D) real log2l()(real x) { return log2(cast(double) x); }
1769 double logb(double x);
1771 float logbf(float x);
1773 extern(D) real logbl()(real x) { return logb(cast(double) x); }
1776 pure double modf(double value, double* iptr);
1778 pure float modff(float value, float* iptr);
1780 extern(D) pure real modfl()(real value, real* iptr)
1782 double i;
1783 double r = modf(cast(double) value, &i);
1784 *iptr = i;
1785 return r;
1789 double scalbn(double x, int n);
1791 float scalbnf(float x, int n);
1793 extern(D) real scalbnl()(real x, int n) { return scalbn(cast(double) x, n); }
1796 double scalbln(double x, c_long n);
1798 float scalblnf(float x, c_long n);
1800 extern(D) real scalblnl()(real x, c_long n) { return scalbln(cast(double) x, n); }
1803 pure double cbrt(double x);
1805 pure float cbrtf(float x);
1807 extern(D) pure real cbrtl()(real x) { return cbrt(cast(double) x); }
1810 pure double fabs(double x);
1812 extern(D) pure float fabsf()(float x) { return cast(float) fabs(x); }
1814 extern(D) pure real fabsl()(real x) { return fabs(cast(double) x); }
1816 private double _hypot(double x, double y);
1817 private float _hypotf(float x, float y);
1819 extern(D) double hypot(double x, double y) { return _hypot(x, y); }
1821 extern(D) float hypotf(float x, float y) { return _hypotf(x, y); }
1823 extern(D) real hypotl(real x, real y) { return _hypot(cast(double) x, cast(double) y); }
1826 double pow(double x, double y);
1828 float powf(float x, float y);
1830 extern(D) real powl()(real x, real y) { return pow(cast(double) x, cast(double) y); }
1833 double sqrt(double x);
1835 float sqrtf(float x);
1837 extern(D) real sqrtl()(real x) { return sqrt(cast(double) x); }
1840 pure double erf(double x);
1842 pure float erff(float x);
1844 extern(D) pure real erfl()(real x) { return erf(cast(double) x); }
1847 double erfc(double x);
1849 float erfcf(float x);
1851 extern(D) real erfcl()(real x) { return erfc(cast(double) x); }
1854 double lgamma(double x);
1856 float lgammaf(float x);
1858 extern(D) real lgammal()(real x) { return lgamma(cast(double) x); }
1861 double tgamma(double x);
1863 float tgammaf(float x);
1865 extern(D) real tgammal()(real x) { return tgamma(cast(double) x); }
1868 pure double ceil(double x);
1870 pure float ceilf(float x);
1872 extern(D) pure real ceill()(real x) { return ceil(cast(double) x); }
1875 pure double floor(double x);
1877 pure float floorf(float x);
1879 extern(D) pure real floorl()(real x) { return floor(cast(double) x); }
1882 pure double nearbyint(double x);
1884 pure float nearbyintf(float x);
1886 extern(D) pure real nearbyintl()(real x) { return nearbyint(cast(double) x); }
1889 pure double rint(double x);
1891 pure float rintf(float x);
1893 extern(D) pure real rintl()(real x) { return rint(cast(double) x); }
1896 c_long lrint(double x);
1898 c_long lrintf(float x);
1900 extern(D) c_long lrintl()(real x) { return lrint(cast(double) x); }
1903 long llrint(double x);
1905 long llrintf(float x);
1907 extern(D) long llrintl()(real x) { return llrint(cast(double) x); }
1910 pure double round(double x);
1912 pure float roundf(float x);
1914 extern(D) pure real roundl()(real x) { return round(cast(double) x); }
1917 c_long lround(double x);
1919 c_long lroundf(float x);
1921 extern(D) c_long lroundl()(real x) { return lround(cast(double) x); }
1924 long llround(double x);
1926 long llroundf(float x);
1928 extern(D) long llroundl()(real x) { return llround(cast(double) x); }
1931 pure double trunc(double x);
1933 pure float truncf(float x);
1935 extern(D) pure real truncl()(real x) { return trunc(cast(double) x); }
1938 double fmod(double x, double y);
1940 float fmodf(float x, float y);
1942 extern(D) real fmodl()(real x, real y) { return fmod(cast(double) x, cast(double) y); }
1945 double remainder(double x, double y);
1947 float remainderf(float x, float y);
1949 extern(D) real remainderl()(real x, real y) { return remainder(cast(double) x, cast(double) y); }
1952 double remquo(double x, double y, int* quo);
1954 float remquof(float x, float y, int* quo);
1956 extern(D) real remquol()(real x, real y, int* quo) { return remquo(cast(double) x, cast(double) y, quo); }
1959 pure double copysign(double x, double y);
1961 pure float copysignf(float x, float y);
1963 extern(D) pure real copysignl()(real x, real y) { return copysign(cast(double) x, cast(double) y); }
1966 pure double nan(char* tagp);
1968 pure float nanf(char* tagp);
1970 extern(D) pure real nanl()(char* tagp) { return nan(tagp); }
1973 double nextafter(double x, double y);
1975 float nextafterf(float x, float y);
1977 extern(D) real nextafterl()(real x, real y) { return nextafter(cast(double) x, cast(double) y); }
1980 double nexttoward(double x, real y);
1982 float nexttowardf(float x, real y);
1984 extern(D) real nexttowardl()(real x, real y) { return nexttoward(cast(double) x, cast(double) y); }
1987 double fdim(double x, double y);
1989 float fdimf(float x, float y);
1991 extern(D) real fdiml()(real x, real y) { return fdim(cast(double) x, cast(double) y); }
1994 pure double fmax(double x, double y);
1996 pure float fmaxf(float x, float y);
1998 extern(D) pure real fmaxl()(real x, real y) { return fmax(cast(double) x, cast(double) y); }
2001 pure double fmin(double x, double y);
2003 pure float fminf(float x, float y);
2005 extern(D) pure real fminl()(real x, real y) { return fmin(cast(double) x, cast(double) y); }
2008 pure double fma(double x, double y, double z);
2010 pure float fmaf(float x, float y, float z);
2012 extern(D) pure real fmal()(real x, real y, real z) { return fma(cast(double) x, cast(double) y, cast(double) z); }
2014 /* NOTE: freebsd < 8-CURRENT doesn't appear to support *l, but we can
2015 * approximate.
2016 * A lot of them were added in 8.0-RELEASE, and so a lot of these workarounds
2017 * should then be removed.
2019 // NOTE: FreeBSD 8.0-RELEASE doesn't support log2* nor these *l functions:
2020 // acoshl, asinhl, atanhl, coshl, sinhl, tanhl, cbrtl, powl, expl,
2021 // expm1l, logl, log1pl, log10l, erfcl, erfl, lgammal, tgammal;
2022 // but we can approximate.
2023 else version (FreeBSD)
2025 version (none) // < 8-CURRENT
2027 real acosl(real x) { return acos(x); }
2028 real asinl(real x) { return asin(x); }
2029 pure real atanl(real x) { return atan(x); }
2030 real atan2l(real y, real x) { return atan2(y, x); }
2031 pure real cosl(real x) { return cos(x); }
2032 pure real sinl(real x) { return sin(x); }
2033 pure real tanl(real x) { return tan(x); }
2034 real exp2l(real x) { return exp2(x); }
2035 pure real frexpl(real value, int* exp) { return frexp(value, exp); }
2036 int ilogbl(real x) { return ilogb(x); }
2037 real ldexpl(real x, int exp) { return ldexp(x, exp); }
2038 real logbl(real x) { return logb(x); }
2039 //real modfl(real value, real *iptr); // nontrivial conversion
2040 real scalbnl(real x, int n) { return scalbn(x, n); }
2041 real scalblnl(real x, c_long n) { return scalbln(x, n); }
2042 pure real fabsl(real x) { return fabs(x); }
2043 real hypotl(real x, real y) { return hypot(x, y); }
2044 real sqrtl(real x) { return sqrt(x); }
2045 pure real ceill(real x) { return ceil(x); }
2046 pure real floorl(real x) { return floor(x); }
2047 pure real nearbyintl(real x) { return nearbyint(x); }
2048 pure real rintl(real x) { return rint(x); }
2049 c_long lrintl(real x) { return lrint(x); }
2050 pure real roundl(real x) { return round(x); }
2051 c_long lroundl(real x) { return lround(x); }
2052 long llroundl(real x) { return llround(x); }
2053 pure real truncl(real x) { return trunc(x); }
2054 real fmodl(real x, real y) { return fmod(x, y); }
2055 real remainderl(real x, real y) { return remainder(x, y); }
2056 real remquol(real x, real y, int* quo) { return remquo(x, y, quo); }
2057 pure real copysignl(real x, real y) { return copysign(x, y); }
2058 // pure double nan(char* tagp);
2059 // pure float nanf(char* tagp);
2060 // pure real nanl(char* tagp);
2061 real nextafterl(real x, real y) { return nextafter(x, y); }
2062 real nexttowardl(real x, real y) { return nexttoward(x, y); }
2063 real fdiml(real x, real y) { return fdim(x, y); }
2064 pure real fmaxl(real x, real y) { return fmax(x, y); }
2065 pure real fminl(real x, real y) { return fmin(x, y); }
2066 pure real fmal(real x, real y, real z) { return fma(x, y, z); }
2068 else
2071 real acosl(real x);
2073 real asinl(real x);
2075 pure real atanl(real x);
2077 real atan2l(real y, real x);
2079 pure real cosl(real x);
2081 pure real sinl(real x);
2083 pure real tanl(real x);
2085 real exp2l(real x);
2087 pure real frexpl(real value, int* exp);
2089 int ilogbl(real x);
2091 real ldexpl(real x, int exp);
2093 real logbl(real x);
2095 pure real modfl(real value, real *iptr);
2097 real scalbnl(real x, int n);
2099 real scalblnl(real x, c_long n);
2101 pure real fabsl(real x);
2103 real hypotl(real x, real y);
2105 real sqrtl(real x);
2107 pure real ceill(real x);
2109 pure real floorl(real x);
2111 pure real nearbyintl(real x);
2113 pure real rintl(real x);
2115 c_long lrintl(real x);
2117 pure real roundl(real x);
2119 c_long lroundl(real x);
2121 long llroundl(real x);
2123 pure real truncl(real x);
2125 real fmodl(real x, real y);
2127 real remainderl(real x, real y);
2129 real remquol(real x, real y, int* quo);
2131 pure real copysignl(real x, real y);
2133 pure double nan(char* tagp);
2135 pure float nanf(char* tagp);
2137 pure real nanl(char* tagp);
2139 real nextafterl(real x, real y);
2141 real nexttowardl(real x, real y);
2143 real fdiml(real x, real y);
2145 pure real fmaxl(real x, real y);
2147 pure real fminl(real x, real y);
2149 pure real fmal(real x, real y, real z);
2152 double acos(double x);
2154 float acosf(float x);
2157 double asin(double x);
2159 float asinf(float x);
2162 pure double atan(double x);
2164 pure float atanf(float x);
2167 double atan2(double y, double x);
2169 float atan2f(float y, float x);
2172 pure double cos(double x);
2174 pure float cosf(float x);
2177 pure double sin(double x);
2179 pure float sinf(float x);
2182 pure double tan(double x);
2184 pure float tanf(float x);
2187 double acosh(double x);
2189 float acoshf(float x);
2191 real acoshl(real x) { return acosh(x); }
2194 pure double asinh(double x);
2196 pure float asinhf(float x);
2198 pure real asinhl(real x) { return asinh(x); }
2201 double atanh(double x);
2203 float atanhf(float x);
2205 real atanhl(real x) { return atanh(x); }
2208 double cosh(double x);
2210 float coshf(float x);
2212 real coshl(real x) { return cosh(x); }
2215 double sinh(double x);
2217 float sinhf(float x);
2219 real sinhl(real x) { return sinh(x); }
2222 pure double tanh(double x);
2224 pure float tanhf(float x);
2226 pure real tanhl(real x) { return tanh(x); }
2229 double exp(double x);
2231 float expf(float x);
2233 real expl(real x) { return exp(x); }
2236 double exp2(double x);
2238 float exp2f(float x);
2241 double expm1(double x);
2243 float expm1f(float x);
2245 real expm1l(real x) { return expm1(x); }
2248 pure double frexp(double value, int* exp);
2250 pure float frexpf(float value, int* exp);
2253 int ilogb(double x);
2255 int ilogbf(float x);
2258 double ldexp(double x, int exp);
2260 float ldexpf(float x, int exp);
2263 double log(double x);
2265 float logf(float x);
2267 real logl(real x) { return log(x); }
2270 double log10(double x);
2272 float log10f(float x);
2274 real log10l(real x) { return log10(x); }
2277 double log1p(double x);
2279 float log1pf(float x);
2281 real log1pl(real x) { return log1p(x); }
2283 private enum real ONE_LN2 = 1 / 0x1.62e42fefa39ef358p-1L;
2285 double log2(double x) { return log(x) * ONE_LN2; }
2287 float log2f(float x) { return logf(x) * ONE_LN2; }
2289 real log2l(real x) { return logl(x) * ONE_LN2; }
2292 double logb(double x);
2294 float logbf(float x);
2297 pure double modf(double value, double* iptr);
2299 pure float modff(float value, float* iptr);
2302 double scalbn(double x, int n);
2304 float scalbnf(float x, int n);
2307 double scalbln(double x, c_long n);
2309 float scalblnf(float x, c_long n);
2312 pure double cbrt(double x);
2314 pure float cbrtf(float x);
2316 pure real cbrtl(real x) { return cbrt(x); }
2319 pure double fabs(double x);
2321 pure float fabsf(float x);
2324 double hypot(double x, double y);
2326 float hypotf(float x, float y);
2329 double pow(double x, double y);
2331 float powf(float x, float y);
2333 real powl(real x, real y) { return pow(x, y); }
2336 double sqrt(double x);
2338 float sqrtf(float x);
2341 pure double erf(double x);
2343 pure float erff(float x);
2345 pure real erfl(real x) { return erf(x); }
2348 double erfc(double x);
2350 float erfcf(float x);
2352 real erfcl(real x) { return erfc(x); }
2355 double lgamma(double x);
2357 float lgammaf(float x);
2359 real lgammal(real x) { return lgamma(x); }
2362 double tgamma(double x);
2364 float tgammaf(float x);
2366 real tgammal(real x) { return tgamma(x); }
2369 pure double ceil(double x);
2371 pure float ceilf(float x);
2374 pure double floor(double x);
2376 pure float floorf(float x);
2379 pure double nearbyint(double x);
2381 pure float nearbyintf(float x);
2384 pure double rint(double x);
2386 pure float rintf(float x);
2389 c_long lrint(double x);
2391 c_long lrintf(float x);
2394 long llrint(double x);
2396 long llrintf(float x);
2398 long llrintl(real x) { return llrint(x); }
2401 pure double round(double x);
2403 pure float roundf(float x);
2406 c_long lround(double x);
2408 c_long lroundf(float x);
2411 long llround(double x);
2413 long llroundf(float x);
2416 pure double trunc(double x);
2418 pure float truncf(float x);
2421 double fmod(double x, double y);
2423 float fmodf(float x, float y);
2426 double remainder(double x, double y);
2428 float remainderf(float x, float y);
2431 double remquo(double x, double y, int* quo);
2433 float remquof(float x, float y, int* quo);
2436 pure double copysign(double x, double y);
2438 pure float copysignf(float x, float y);
2441 double nextafter(double x, double y);
2443 float nextafterf(float x, float y);
2446 double nexttoward(double x, real y);
2448 float nexttowardf(float x, real y);
2451 double fdim(double x, double y);
2453 float fdimf(float x, float y);
2456 pure double fmax(double x, double y);
2458 pure float fmaxf(float x, float y);
2461 pure double fmin(double x, double y);
2463 pure float fminf(float x, float y);
2466 pure double fma(double x, double y, double z);
2468 pure float fmaf(float x, float y, float z);
2470 else version (NetBSD)
2474 real acosl(real x);
2476 real asinl(real x);
2478 pure real atanl(real x);
2480 real atan2l(real y, real x);
2482 pure real cosl(real x);
2484 pure real sinl(real x);
2486 pure real tanl(real x);
2488 real exp2l(real x);
2490 pure real frexpl(real value, int* exp);
2492 int ilogbl(real x);
2494 real ldexpl(real x, int exp);
2496 real logbl(real x);
2498 pure real modfl(real value, real *iptr);
2500 real scalbnl(real x, int n);
2502 real scalblnl(real x, c_long n);
2504 pure real fabsl(real x);
2506 real hypotl(real x, real y);
2508 real sqrtl(real x);
2510 pure real ceill(real x);
2512 pure real floorl(real x);
2514 pure real nearbyintl(real x);
2516 pure real rintl(real x);
2518 c_long lrintl(real x) { return cast(c_long)rintl(x); }
2520 pure real roundl(real x);
2522 c_long lroundl(real x) { return cast(c_long)roundl(x);}
2524 long llroundl(real x) { return cast(long)roundl(x);}
2526 pure real truncl(real x);
2528 real fmodl(real x, real y);
2530 real remainderl(real x, real y) { return remainder(x,y); }
2532 real remquol(real x, real y, int* quo){ return remquo(x,y,quo); }
2534 pure real copysignl(real x, real y);
2536 pure double nan(char* tagp);
2538 pure float nanf(char* tagp);
2540 pure real nanl(char* tagp);
2542 real nextafterl(real x, real y);
2544 real nexttowardl(real x, real y) { return nexttoward(cast(double) x, cast(double) y); }
2546 real fdiml(real x, real y);
2548 pure real fmaxl(real x, real y);
2550 pure real fminl(real x, real y);
2552 pure real fmal(real x, real y, real z);
2555 double acos(double x);
2557 float acosf(float x);
2560 double asin(double x);
2562 float asinf(float x);
2565 pure double atan(double x);
2567 pure float atanf(float x);
2570 double atan2(double y, double x);
2572 float atan2f(float y, float x);
2575 pure double cos(double x);
2577 pure float cosf(float x);
2580 pure double sin(double x);
2582 pure float sinf(float x);
2585 pure double tan(double x);
2587 pure float tanf(float x);
2590 double acosh(double x);
2592 float acoshf(float x);
2594 real acoshl(real x);
2597 pure double asinh(double x);
2599 pure float asinhf(float x);
2601 pure real asinhl(real x);
2604 double atanh(double x);
2606 float atanhf(float x);
2608 real atanhl(real x);
2611 double cosh(double x);
2613 float coshf(float x);
2615 real coshl(real x);
2618 double sinh(double x);
2620 float sinhf(float x);
2622 real sinhl(real x);
2625 pure double tanh(double x);
2627 pure float tanhf(float x);
2629 pure real tanhl(real x);
2632 double exp(double x);
2634 float expf(float x);
2636 real expl(real x);
2639 double exp2(double x);
2641 float exp2f(float x);
2644 double expm1(double x);
2646 float expm1f(float x);
2648 real expm1l(real x) { return expm1(cast(double) x); }
2651 pure double frexp(double value, int* exp);
2653 pure float frexpf(float value, int* exp);
2656 int ilogb(double x);
2658 int ilogbf(float x);
2661 double ldexp(double x, int exp);
2663 float ldexpf(float x, int exp);
2666 double log(double x);
2668 float logf(float x);
2669 /// NetBSD has no logl. It is just alias log(double)
2670 real logl(real x)
2672 if (x<0) return real.nan;
2673 if (x==0) return -real.infinity;
2674 if (isnan(x) || isinf(x)) return x;
2675 real rs = 0;
2676 if (x>double.max)
2678 immutable MAX = log(double.max);
2679 for (; x>double.max; x /= double.max)
2680 rs += MAX;
2682 else if (x<double.min_normal)
2684 immutable MIN = log(double.min_normal);
2685 for (; x<double.min_normal; x /= double.min_normal)
2686 rs += MIN;
2688 rs += log(x);
2689 return rs;
2693 double log10(double x);
2695 float log10f(float x);
2696 ///NetBSD has no log10l. It is just alias log(double)
2697 real log10l(real x)
2699 if (x<0) return real.nan;
2700 if (x==0) return -real.infinity;
2701 if (isnan(x) || isinf(x)) return x;
2703 real rs = 0;
2704 if (x>double.max)
2706 immutable MAX = log10(double.max);
2707 for (; x>double.max; x /= double.max)
2708 rs += MAX;
2710 else if (x<double.min_normal)
2712 immutable MIN = log10(double.min_normal);
2713 for (; x<double.min_normal; x /= double.min_normal)
2714 rs += MIN;
2716 rs += log10(x);
2717 return rs;
2722 double log1p(double x);
2724 float log1pf(float x);
2726 real log1pl(real x) { return log1p(cast(double) x); }
2728 private enum real ONE_LN2 = 1 / 0x1.62e42fefa39ef358p-1L;
2730 double log2(double x) { return log(x) * ONE_LN2; }
2732 float log2f(float x) { return logf(x) * ONE_LN2; }
2734 real log2l(real x) { return logl(x) * ONE_LN2; }
2737 double logb(double x);
2739 float logbf(float x);
2742 pure double modf(double value, double* iptr);
2744 pure float modff(float value, float* iptr);
2747 double scalbn(double x, int n);
2749 float scalbnf(float x, int n);
2752 double scalbln(double x, c_long n);
2754 float scalblnf(float x, c_long n);
2757 pure double cbrt(double x);
2759 pure float cbrtf(float x);
2761 pure real cbrtl(real x);
2764 pure double fabs(double x);
2766 pure float fabsf(float x);
2769 double hypot(double x, double y);
2771 float hypotf(float x, float y);
2774 double pow(double x, double y);
2776 float powf(float x, float y);
2778 real powl(real x, real y);
2781 double sqrt(double x);
2783 float sqrtf(float x);
2786 pure double erf(double x);
2788 pure float erff(float x);
2790 pure real erfl(real x) { return erf(cast(double) x); }
2793 double erfc(double x);
2795 float erfcf(float x);
2797 real erfcl(real x) { return erfc(cast(double) x); }
2800 double lgamma(double x);
2802 float lgammaf(float x);
2804 real lgammal(real x){ return lgamma(x); }
2807 double tgamma(double x);
2809 float tgammaf(float x);
2811 real tgammal(real x){ return tgamma(cast(double) x); }
2814 pure double ceil(double x);
2816 pure float ceilf(float x);
2819 pure double floor(double x);
2821 pure float floorf(float x);
2824 pure double nearbyint(double x);
2826 pure float nearbyintf(float x);
2829 pure double rint(double x);
2831 pure float rintf(float x);
2834 c_long lrint(double x);
2836 c_long lrintf(float x);
2839 long llrint(double x);
2841 long llrintf(float x);
2843 long llrintl(real x) { return cast(long)rintl(x); }
2846 pure double round(double x);
2848 pure float roundf(float x);
2851 c_long lround(double x);
2853 c_long lroundf(float x);
2856 long llround(double x);
2858 long llroundf(float x);
2861 pure double trunc(double x);
2863 pure float truncf(float x);
2866 double fmod(double x, double y);
2868 float fmodf(float x, float y);
2871 double remainder(double x, double y);
2873 float remainderf(float x, float y);
2876 double remquo(double x, double y, int* quo);
2878 float remquof(float x, float y, int* quo);
2881 pure double copysign(double x, double y);
2883 pure float copysignf(float x, float y);
2886 double nextafter(double x, double y);
2888 float nextafterf(float x, float y);
2891 double nexttoward(double x, real y);
2893 float nexttowardf(float x, real y);
2896 double fdim(double x, double y);
2898 float fdimf(float x, float y);
2901 pure double fmax(double x, double y);
2903 pure float fmaxf(float x, float y);
2906 pure double fmin(double x, double y);
2908 pure float fminf(float x, float y);
2911 pure double fma(double x, double y, double z);
2913 pure float fmaf(float x, float y, float z);
2915 else version (OpenBSD)
2918 real acosl(real x);
2920 real asinl(real x);
2922 pure real atanl(real x);
2924 real atan2l(real y, real x);
2926 pure real cosl(real x);
2928 pure real sinl(real x);
2930 pure real tanl(real x);
2932 real acoshl(real x);
2934 pure real asinhl(real x);
2936 real atanhl(real x);
2938 real coshl(real x);
2940 real sinhl(real x);
2942 pure real tanhl(real x);
2944 real expl(real x);
2946 real exp2l(real x);
2948 real expm1l(real x);
2950 pure real frexpl(real value, int* exp);
2952 int ilogbl(real x);
2954 real ldexpl(real x, int exp);
2956 real logbl(real x);
2958 real logb10l(real x);
2960 real logb1pl(real x);
2962 real logb2l(real x);
2964 real logbl(real x);
2966 pure real modfl(real value, real *iptr);
2968 real scalbnl(real x, int n);
2970 real scalblnl(real x, c_long n);
2972 pure real cbrtl(real x);
2974 pure real fabsl(real x);
2976 real hypotl(real x, real y);
2978 real powl(real x, real y);
2980 real sqrtl(real x);
2982 pure real ceill(real x);
2984 pure real floorl(real x);
2986 pure real nearbyintl(real x);
2988 pure real rintl(real x);
2990 c_long lrintl(real x);
2992 long llrintl(real x);
2994 pure real roundl(real x);
2996 c_long lroundl(real x);
2998 long llroundl(real x);
3000 pure real truncl(real x);
3002 real fmodl(real x, real y);
3004 real remainderl(real x, real y);
3006 real remquol(real x, real y, int* quo);
3008 pure real copysignl(real x, real y);
3010 pure double nan(char* tagp);
3012 pure float nanf(char* tagp);
3014 pure real nanl(char* tagp);
3016 real nextafterl(real x, real y);
3018 real nexttowardl(real x, real y);
3020 real fdiml(real x, real y);
3022 pure real fmaxl(real x, real y);
3024 pure real fminl(real x, real y);
3026 pure real fmal(real x, real y, real z);
3029 double acos(double x);
3031 float acosf(float x);
3034 double asin(double x);
3036 float asinf(float x);
3039 pure double atan(double x);
3041 pure float atanf(float x);
3044 double atan2(double y, double x);
3046 float atan2f(float y, float x);
3049 pure double cos(double x);
3051 pure float cosf(float x);
3054 pure double sin(double x);
3056 pure float sinf(float x);
3059 pure double tan(double x);
3061 pure float tanf(float x);
3064 double acosh(double x);
3066 float acoshf(float x);
3069 pure double asinh(double x);
3071 pure float asinhf(float x);
3074 double atanh(double x);
3076 float atanhf(float x);
3079 double cosh(double x);
3081 float coshf(float x);
3084 double sinh(double x);
3086 float sinhf(float x);
3089 pure double tanh(double x);
3091 pure float tanhf(float x);
3094 double exp(double x);
3096 float expf(float x);
3099 double exp2(double x);
3101 float exp2f(float x);
3103 real exp2l(real x);
3106 double expm1(double x);
3108 float expm1f(float x);
3111 pure double frexp(double value, int* exp);
3113 pure float frexpf(float value, int* exp);
3116 int ilogb(double x);
3118 int ilogbf(float x);
3121 double ldexp(double x, int exp);
3123 float ldexpf(float x, int exp);
3126 double log(double x);
3128 float logf(float x);
3131 double log10(double x);
3133 float log10f(float x);
3136 double log1p(double x);
3138 float log1pf(float x);
3141 double log2(double x);
3143 float log2f(float x);
3145 real log2l(real x);
3148 double logb(double x);
3150 float logbf(float x);
3153 pure double modf(double value, double* iptr);
3155 pure float modff(float value, float* iptr);
3158 double scalbn(double x, int n);
3160 float scalbnf(float x, int n);
3163 double scalbln(double x, c_long n);
3165 float scalblnf(float x, c_long n);
3168 pure double cbrt(double x);
3170 pure float cbrtf(float x);
3173 pure double fabs(double x);
3175 pure float fabsf(float x);
3178 double hypot(double x, double y);
3180 float hypotf(float x, float y);
3183 double pow(double x, double y);
3185 float powf(float x, float y);
3188 double sqrt(double x);
3190 float sqrtf(float x);
3193 pure double erf(double x);
3195 pure float erff(float x);
3197 pure real erfl(real x);
3200 double erfc(double x);
3202 float erfcf(float x);
3204 real erfcl(real x);
3207 double lgamma(double x);
3209 float lgammaf(float x);
3211 real lgammal(real x);
3214 double tgamma(double x);
3216 float tgammaf(float x);
3218 real tgammal(real x);
3221 pure double ceil(double x);
3223 pure float ceilf(float x);
3226 pure double floor(double x);
3228 pure float floorf(float x);
3231 pure double nearbyint(double x);
3233 pure float nearbyintf(float x);
3236 pure double rint(double x);
3238 pure float rintf(float x);
3241 c_long lrint(double x);
3243 c_long lrintf(float x);
3246 long llrint(double x);
3248 long llrintf(float x);
3251 pure double round(double x);
3253 pure float roundf(float x);
3256 c_long lround(double x);
3258 c_long lroundf(float x);
3261 long llround(double x);
3263 long llroundf(float x);
3266 pure double trunc(double x);
3268 pure float truncf(float x);
3271 double fmod(double x, double y);
3273 float fmodf(float x, float y);
3276 double remainder(double x, double y);
3278 float remainderf(float x, float y);
3281 double remquo(double x, double y, int* quo);
3283 float remquof(float x, float y, int* quo);
3286 pure double copysign(double x, double y);
3288 pure float copysignf(float x, float y);
3291 double nextafter(double x, double y);
3293 float nextafterf(float x, float y);
3296 double nexttoward(double x, real y);
3298 float nexttowardf(float x, real y);
3301 double fdim(double x, double y);
3303 float fdimf(float x, float y);
3306 pure double fmax(double x, double y);
3308 pure float fmaxf(float x, float y);
3311 pure double fmin(double x, double y);
3313 pure float fminf(float x, float y);
3316 pure double fma(double x, double y, double z);
3318 pure float fmaf(float x, float y, float z);
3320 else version (DragonFlyBSD)
3322 /* double */
3323 double acos(double x);
3324 double asin(double x);
3325 pure double atan(double x);
3326 double atan2(double, double);
3327 pure double cos(double x);
3328 pure double sin(double x);
3329 pure double tan(double x);
3331 double cosh(double x);
3332 double sinh(double x);
3333 pure double tanh(double x);
3335 double exp(double x);
3336 pure double frexp(double, int *exp);
3337 double ldexp(double, int exp);
3338 double log(double x);
3339 double log10(double x);
3340 pure double modf(double x, double *iptr);
3342 double pow(double x, double y);
3343 double sqrt(double x);
3345 pure double ceil(double x);
3346 pure double fabs(double x);
3347 pure double floor(double x);
3348 double fmod(double x, double);
3350 double acosh(double x);
3351 pure double asinh(double x);
3352 double atanh(double x);
3354 double exp2(double x);
3355 double expm1(double x);
3356 int ilogb(double x);
3357 double log1p(double x);
3358 double log2(double x);
3359 double logb(double x);
3360 double scalbn(double x, int n);
3361 double scalbln(double x, c_long n);
3363 pure double cbrt(double x);
3364 double hypot(double x, double y);
3366 pure double erf(double x);
3367 double erfc(double x);
3368 double lgamma(double x);
3369 double tgamma(double x);
3371 pure double nearbyint(double x);
3372 pure double rint(double x);
3373 c_long lrint(double x);
3374 long llrint(double x);
3375 pure double round(double x);
3376 c_long lround(double x);
3377 long llround(double x);
3378 pure double trunc(double x);
3380 double remainder(double x , double y);
3381 double remquo(double x, double y, int * quo);
3383 pure double copysign(double x, double y);
3384 pure double nan(const char *);
3385 double nextafter(double x, double y);
3386 double nexttoward(double x, real y);
3388 double fdim(double x, double y);
3389 pure double fmax(double x, double y);
3390 pure double fmin(double x, double y);
3392 pure double fma(double x, double y, double z);
3394 double j0(double x);
3395 double j1(double x);
3396 double jn(int, double);
3397 double y0(double x);
3398 double y1(double x);
3399 double yn(int, double);
3401 double gamma(double x);
3402 double scalb(double x, double y);
3404 double drem(double x, double y);
3405 int finite(double x);
3406 double gamma_r(double x, int *);
3407 double lgamma_r(double x, int *);
3409 double significand(double x);
3411 /* float */
3412 float acosf(float x);
3413 float asinf(float x);
3414 pure float atanf(float x);
3415 float atan2f(float x, float y);
3416 pure float cosf(float x);
3417 pure float sinf(float x);
3418 pure float tanf(float x);
3420 float acoshf(float x);
3421 pure float asinhf(float x);
3422 float atanhf(float x);
3423 float coshf(float x);
3424 float sinhf(float x);
3425 pure float tanhf(float x);
3427 float expf(float x);
3428 float exp2f(float x);
3429 float expm1f(float x);
3430 pure float frexpf(float x, int *exp);
3431 int ilogbf(float x);
3432 float ldexpf(float x, int exp);
3433 float logf(float x);
3434 float log10f(float x);
3435 float log1pf(float x);
3436 float log2f(float x);
3437 float logbf(float x);
3438 pure float modff(float x, float *iptr);
3439 float scalbnf(float x, int y);
3440 float scalblnf(float x, c_long y);
3442 pure float cbrtf(float x);
3443 pure float fabsf(float x);
3444 float hypotf(float x, float y);
3445 float powf(float x, float y);
3446 float sqrtf(float x);
3448 pure float erff(float x);
3449 float erfcf(float x);
3450 float lgammaf(float x);
3451 float tgammaf(float x);
3453 pure float ceilf(float x);
3454 pure float floorf(float x);
3455 pure float nearbyintf(float x);
3456 pure float rintf(float x);
3457 c_long lrintf(float x);
3458 long llrintf(float x);
3459 pure float roundf(float x);
3460 c_long lroundf(float x);
3461 long llroundf(float x);
3462 pure float truncf(float x);
3464 pure float fmodf(float x, float y);
3465 float remainderf(float x, float y);
3466 float remquof(float x, float y, int *iptr);
3468 pure float copysignf(float x, float y);
3469 pure float nanf(const char *);
3470 float nextafterf(float x, float y);
3471 float nexttowardf(float x, real y);
3473 float fdimf(float x, float y);
3474 pure float fmaxf(float x, float y);
3475 pure float fminf(float x, float y);
3477 pure float fmaf(float x, float y, float z);
3479 float j0f(float x);
3480 float j1f(float x);
3481 float jnf(int, float);
3482 float scalbf(float x, float);
3483 float y0f(float x);
3484 float y1f(float x);
3485 float ynf(int, float);
3486 float gammaf(float x);
3487 float dremf(float x, float);
3488 pure int finitef(float x);
3489 pure int isinff(float x);
3490 pure int isnanf(float x);
3492 float gammaf_r(float x, int *);
3493 float lgammaf_r(float x, int *);
3494 float significandf(float x);
3496 /* real */
3497 pure real acosl(real x);
3498 pure real asinl(real x);
3499 pure real atanl(real x);
3500 real atan2l(real x, real y);
3501 pure real cosl(real x);
3502 pure real sinl(real x);
3503 pure real tanl(real x);
3505 real acoshl(real x);
3506 pure real asinhl(real x);
3507 real atanhl(real x);
3508 real coshl(real x);
3509 real sinhl(real x);
3510 pure real tanhl(real x);
3512 real expl(real x);
3513 real exp2l(real x);
3514 real expm1l(real x);
3515 pure real frexpl(real x, int *exp);
3516 int ilogbl(real x);
3517 real ldexpl(real x, int exp);
3518 real logl(real x);
3519 real log10l(real x);
3520 real log1pl(real x);
3521 real log2l(real x);
3522 real logbl(real x);
3523 pure real modfl(real x, real *iptr);
3524 real scalbnl(real x, int y);
3525 real scalblnl(real x, c_long y);
3527 pure real cbrtl(real x);
3528 pure real fabsl(real x);
3529 real hypotl(real x, real y);
3530 real powl(real x, real y);
3531 real sqrtl(real x);
3533 pure real erfl(real x);
3534 real erfcl(real x);
3535 real lgammal(real x);
3536 real tgammal(real x);
3538 pure real ceill(real x);
3539 pure real floorl(real x);
3540 pure real nearbyintl(real x);
3541 pure real rintl(real x);
3542 c_long lrintl(real x);
3543 long llrintl(real x);
3544 pure real roundl(real x);
3545 c_long lroundl(real x);
3546 long llroundl(real x);
3547 pure real truncl(real x);
3549 pure real fmodl(real x, real);
3550 pure real remainderl(real x, real);
3551 pure real remquol(real x, real y, int *iptr);
3553 pure real copysignl(real x, real y);
3554 pure real nanl(const char *);
3555 real nextafterl(real x, real y);
3556 real nexttowardl(real x, real y);
3558 real fdiml(real x, real y);
3559 pure real fmaxl(real x, real y);
3560 pure real fminl(real x, real y);
3562 pure real fmal(real x, real, real);
3564 else version (CRuntime_Bionic)
3567 double acos(double x);
3569 float acosf(float x);
3570 /// Added since Lollipop
3571 real acosl(real x);
3574 double asin(double x);
3576 float asinf(float x);
3577 /// Added since Lollipop
3578 real asinl(real x);
3581 pure double atan(double x);
3583 pure float atanf(float x);
3584 /// Added since Lollipop
3585 pure real atanl(real x);
3588 double atan2(double y, double x);
3590 float atan2f(float y, float x);
3591 /// Added since Lollipop
3592 real atan2l(real y, real x);
3595 pure double cos(double x);
3597 pure float cosf(float x);
3599 pure real cosl(real x);
3602 pure double sin(double x);
3604 pure float sinf(float x);
3605 /// Added since Lollipop
3606 pure real sinl(real x);
3609 pure double tan(double x);
3611 pure float tanf(float x);
3612 /// Added since Lollipop
3613 pure real tanl(real x);
3616 double acosh(double x);
3618 float acoshf(float x);
3619 /// Added since Lollipop
3620 real acoshl(real x);
3623 pure double asinh(double x);
3625 pure float asinhf(float x);
3626 /// Added since Lollipop
3627 pure real asinhl(real x);
3630 double atanh(double x);
3632 float atanhf(float x);
3633 /// Added since Lollipop
3634 real atanhl(real x);
3637 double cosh(double x);
3639 float coshf(float x);
3640 /// Added since Lollipop
3641 real coshl(real x);
3644 double sinh(double x);
3646 float sinhf(float x);
3647 /// Added since Lollipop
3648 real sinhl(real x);
3651 pure double tanh(double x);
3653 pure float tanhf(float x);
3654 /// Added since Lollipop
3655 pure real tanhl(real x);
3658 double exp(double x);
3660 float expf(float x);
3662 real expl(real x);
3665 double exp2(double x);
3667 float exp2f(float x);
3668 /// Added since Lollipop
3669 real exp2l(real x);
3672 double expm1(double x);
3674 float expm1f(float x);
3675 /// Added since Lollipop
3676 real expm1l(real x);
3679 pure double frexp(double value, int* exp);
3681 pure float frexpf(float value, int* exp);
3682 /// Added since Lollipop
3683 pure real frexpl(real value, int* exp);
3686 int ilogb(double x);
3688 int ilogbf(float x);
3690 int ilogbl(real x);
3693 double ldexp(double x, int exp);
3695 float ldexpf(float x, int exp);
3697 real ldexpl(real x, int exp);
3700 double log(double x);
3702 float logf(float x);
3703 /// Added since Lollipop
3704 real logl(real x);
3707 double log10(double x);
3709 float log10f(float x);
3710 /// Added since Lollipop
3711 real log10l(real x);
3714 double log1p(double x);
3716 float log1pf(float x);
3717 /// Added since Lollipop
3718 real log1pl(real x);
3721 double log2(double x);
3723 float log2f(float x);
3725 real log2l(real x);
3728 double logb(double x);
3730 float logbf(float x);
3732 real logbl(real x);
3735 pure double modf(double value, double* iptr);
3737 pure float modff(float value, float* iptr);
3738 /// Added since Lollipop
3739 pure real modfl(real value, real *iptr);
3742 double scalbn(double x, int n);
3744 float scalbnf(float x, int n);
3746 real scalbnl(real x, int n);
3749 double scalbln(double x, c_long n);
3751 float scalblnf(float x, c_long n);
3753 real scalblnl(real x, c_long n);
3756 pure double cbrt(double x);
3758 pure float cbrtf(float x);
3759 /// Added since Lollipop
3760 pure real cbrtl(real x);
3763 pure double fabs(double x);
3765 pure float fabsf(float x);
3767 pure real fabsl(real x);
3770 double hypot(double x, double y);
3772 float hypotf(float x, float y);
3773 /// Added since Lollipop
3774 real hypotl(real x, real y);
3777 double pow(double x, double y);
3779 float powf(float x, float y);
3780 /// Added since Lollipop
3781 real powl(real x, real y);
3784 double sqrt(double x);
3786 float sqrtf(float x);
3787 /// Added since Lollipop
3788 real sqrtl(real x);
3791 pure double erf(double x);
3793 pure float erff(float x);
3794 /// Added since Lollipop
3795 pure real erfl(real x);
3798 double erfc(double x);
3800 float erfcf(float x);
3801 /// Added since Lollipop
3802 real erfcl(real x);
3805 double lgamma(double x);
3807 float lgammaf(float x);
3808 /// Added since Lollipop
3809 real lgammal(real x);
3812 double tgamma(double x);
3814 float tgammaf(float x);
3815 /// Added since Lollipop
3816 real tgammal(real x);
3819 pure double ceil(double x);
3821 pure float ceilf(float x);
3823 pure real ceill(real x);
3826 pure double floor(double x);
3828 pure float floorf(float x);
3830 pure real floorl(real x);
3833 pure double nearbyint(double x);
3835 pure float nearbyintf(float x);
3836 /// Added since Lollipop
3837 pure real nearbyintl(real x);
3840 pure double rint(double x);
3842 pure float rintf(float x);
3843 /// Added since Lollipop
3844 pure real rintl(real x);
3847 c_long lrint(double x);
3849 c_long lrintf(float x);
3850 /// Added since Lollipop
3851 c_long lrintl(real x);
3854 long llrint(double x);
3856 long llrintf(float x);
3857 /// Added since Lollipop
3858 long llrintl(real x);
3861 pure double round(double x);
3863 pure float roundf(float x);
3865 pure real roundl(real x);
3868 c_long lround(double x);
3870 c_long lroundf(float x);
3872 c_long lroundl(real x);
3875 long llround(double x);
3877 long llroundf(float x);
3879 long llroundl(real x);
3882 pure double trunc(double x);
3884 pure float truncf(float x);
3886 pure real truncl(real x);
3889 double fmod(double x, double y);
3891 float fmodf(float x, float y);
3892 /// Added since Lollipop
3893 real fmodl(real x, real y);
3896 double remainder(double x, double y);
3898 float remainderf(float x, float y);
3899 /// Added since Lollipop
3900 real remainderl(real x, real y);
3903 double remquo(double x, double y, int* quo);
3905 float remquof(float x, float y, int* quo);
3906 /// Added since Lollipop
3907 real remquol(real x, real y, int* quo);
3910 pure double copysign(double x, double y);
3912 pure float copysignf(float x, float y);
3914 pure real copysignl(real x, real y);
3917 pure double nan(char* tagp);
3919 pure float nanf(char* tagp);
3921 pure real nanl(char* tagp);
3924 double nextafter(double x, double y);
3926 float nextafterf(float x, float y);
3927 /// Added since Lollipop
3928 real nextafterl(real x, real y);
3931 double nexttoward(double x, real y);
3933 float nexttowardf(float x, real y);
3935 real nexttowardl(real x, real y);
3938 double fdim(double x, double y);
3940 float fdimf(float x, float y);
3942 real fdiml(real x, real y);
3945 pure double fmax(double x, double y);
3947 pure float fmaxf(float x, float y);
3949 pure real fmaxl(real x, real y);
3952 pure double fmin(double x, double y);
3954 pure float fminf(float x, float y);
3956 pure real fminl(real x, real y);
3959 pure double fma(double x, double y, double z);
3961 pure float fmaf(float x, float y, float z);
3962 /// Added since Lollipop
3963 pure real fmal(real x, real y, real z);
3965 else version (CRuntime_UClibc)
3967 // uClibc wraps 'long double' to double, so we do the same for 'real'
3970 double acos(double x);
3972 float acosf(float x);
3974 real acosl(real x) { return acos(cast(double) x); }
3977 double asin(double x);
3979 float asinf(float x);
3981 real asinl(real x) { return asin(cast(double) x); }
3984 pure double atan(double x);
3986 pure float atanf(float x);
3988 pure real atanl(real x) { return atan(cast(double) x); }
3991 double atan2(double y, double x);
3993 float atan2f(float y, float x);
3995 real atan2l(real y, real x) { return atan2(cast(double) x, cast(double) y); }
3998 pure double cos(double x);
4000 pure float cosf(float x);
4002 pure real cosl(real x) { return cos(cast(double) x); }
4005 pure double sin(double x);
4007 pure float sinf(float x);
4009 pure real sinl(real x) { return sin(cast(double) x); }
4012 pure double tan(double x);
4014 pure float tanf(float x);
4016 pure real tanl(real x) { return tan(cast(double) x); }
4019 double acosh(double x);
4021 float acoshf(float x);
4023 real acoshl(real x) { return acosh(cast(double) x); }
4026 pure double asinh(double x);
4028 pure float asinhf(float x);
4030 pure real asinhl(real x) { return asinh(cast(double) x); }
4033 double atanh(double x);
4035 float atanhf(float x);
4037 real atanhl(real x) { return atanh(cast(double) x); }
4040 double cosh(double x);
4042 float coshf(float x);
4044 real coshl(real x) { return cosh(cast(double) x); }
4047 double sinh(double x);
4049 float sinhf(float x);
4051 real sinhl(real x) { return sinh(cast(double) x); }
4054 double tanh(double x);
4056 float tanhf(float x);
4058 real tanhl(real x) { return tanh(cast(double) x); }
4061 double exp(double x);
4063 float expf(float x);
4065 real expl(real x) { return exp(cast(double) x); }
4068 double exp2(double x);
4070 float exp2f(float x);
4072 real exp2l(real x) { return exp2(cast(double) x); }
4075 double expm1(double x);
4077 float expm1f(float x);
4079 real expm1l(real x) { return expm1(cast(double) x); }
4082 pure double frexp(double value, int* exp);
4084 pure float frexpf(float value, int* exp);
4086 pure real frexpl(real value, int* exp) { return frexp(cast(double) value, exp); }
4089 int ilogb(double x);
4091 int ilogbf(float x);
4093 int ilogbl(real x) { return ilogb(cast(double) x); }
4096 double ldexp(double x, int exp);
4098 float ldexpf(float x, int exp);
4100 real ldexpl(real x, int exp) { return ldexp(cast(double) x, exp); }
4103 double log(double x);
4105 float logf(float x);
4107 real logl(real x) { return log(cast(double) x); }
4110 double log10(double x);
4112 float log10f(float x);
4114 real log10l(real x) { return log10(cast(double) x); }
4117 double log1p(double x);
4119 float log1pf(float x);
4121 real log1pl(real x) { return log1p(cast(double) x); }
4124 double log2(double x);
4126 float log2f(float x);
4128 real log2l(real x) { return log2(cast(double) x); }
4131 double logb(double x);
4133 float logbf(float x);
4135 real logbl(real x) { return logb(cast(double) x); }
4138 pure double modf(double value, double* iptr);
4140 pure float modff(float value, float* iptr);
4142 pure real modfl(real value, real *iptr) { return modf(cast(double) value, cast(double*) iptr); }
4145 double scalbn(double x, int n);
4147 float scalbnf(float x, int n);
4149 real scalbnl(real x, int n) { return scalbln(cast(double) x, n); }
4152 double scalbln(double x, c_long n);
4154 float scalblnf(float x, c_long n);
4156 real scalblnl(real x, c_long n) { return scalbln(cast(double) x, n); }
4159 pure double cbrt(double x);
4161 pure float cbrtf(float x);
4163 pure real cbrtl(real x) { return cbrt(cast(double) x); }
4166 pure double fabs(double x);
4168 pure float fabsf(float x);
4170 pure real fabsl(real x) { return fabs(cast(double) x); }
4173 double hypot(double x, double y);
4175 float hypotf(float x, float y);
4177 real hypotl(real x, real y) { return hypot(cast(double) x, cast(double) y); }
4180 double pow(double x, double y);
4182 float powf(float x, float y);
4184 real powl(real x, real y) { return pow(cast(double) x, cast(double) y); }
4187 double sqrt(double x);
4189 float sqrtf(float x);
4191 real sqrtl(real x) { return sqrt(cast(double) x); }
4194 pure double erf(double x);
4196 pure float erff(float x);
4198 pure real erfl(real x) { return erf(cast(double) x); }
4201 double erfc(double x);
4203 float erfcf(float x);
4205 real erfcl(real x) { return erfc(cast(double) x); }
4208 double lgamma(double x);
4210 float lgammaf(float x);
4212 real lgammal(real x) { return lgamma(cast(double) x); }
4215 double tgamma(double x);
4217 float tgammaf(float x);
4219 real tgammal(real x) { return tgamma(cast(double) x); }
4222 pure double ceil(double x);
4224 pure float ceilf(float x);
4226 pure real ceill(real x) { return ceil(cast(double) x); }
4229 pure double floor(double x);
4231 pure float floorf(float x);
4233 pure real floorl(real x) { return floor(cast(double) x); }
4236 pure double nearbyint(double x);
4238 pure float nearbyintf(float x);
4240 pure real nearbyintl(real x) { return nearbyint(cast(double) x); }
4243 pure double rint(double x);
4245 pure float rintf(float x);
4247 pure real rintl(real x) { return rint(cast(double) x); }
4250 c_long lrint(double x);
4252 c_long lrintf(float x);
4254 c_long lrintl(real x) { return lrint(cast(double) x); }
4257 long llrint(double x);
4259 long llrintf(float x);
4261 long llrintl(real x) { return llrint(cast(double) x); }
4264 pure double round(double x);
4266 pure float roundf(float x);
4268 pure real roundl(real x) { return round(cast(double) x); }
4271 c_long lround(double x);
4273 c_long lroundf(float x);
4275 c_long lroundl(real x) { return lround(cast(double) x); }
4278 long llround(double x);
4280 long llroundf(float x);
4282 long llroundl(real x) { return llround(cast(double) x); }
4285 pure double trunc(double x);
4287 pure float truncf(float x);
4289 pure real truncl(real x) { return trunc(cast(double) x); }
4292 double fmod(double x, double y);
4294 float fmodf(float x, float y);
4296 real fmodl(real x, real y) { return fmod(cast(double) x, cast(double) y); }
4299 double remainder(double x, double y);
4301 float remainderf(float x, float y);
4303 real remainderl(real x, real y) { return remainder(cast(double) x, cast(double) y); }
4306 double remquo(double x, double y, int* quo);
4308 float remquof(float x, float y, int* quo);
4310 real remquol(real x, real y, int* quo) { return remquo(cast(double) x, cast(double) y, quo); }
4313 pure double copysign(double x, double y);
4315 pure float copysignf(float x, float y);
4317 pure real copysignl(real x, real y) { return copysign(cast(double) x, cast(double) y); }
4320 pure double nan(char* tagp);
4322 pure float nanf(char* tagp);
4324 pure real nanl(char* tagp) { return nan(tagp); }
4327 double nextafter(double x, double y);
4329 float nextafterf(float x, float y);
4331 real nextafterl(real x, real y) { return nextafter(cast(double) x, cast(double) y); }
4334 double nexttoward(double x, real y);
4336 float nexttowardf(float x, real y);
4338 real nexttowardl(real x, real y) { return nexttoward(cast(double) x, cast(double) y); }
4341 double fdim(double x, double y);
4343 float fdimf(float x, float y);
4345 real fdiml(real x, real y) { return fdim(cast(double) x, cast(double) y); }
4348 pure double fmax(double x, double y);
4350 pure float fmaxf(float x, float y);
4352 pure real fmaxl(real x, real y) { return fmax(cast(double) x, cast(double) y); }
4355 pure double fmin(double x, double y);
4357 pure float fminf(float x, float y);
4359 pure real fminl(real x, real y) { return fmin(cast(double) x, cast(double) y); }
4362 pure double fma(double x, double y, double z);
4364 pure float fmaf(float x, float y, float z);
4366 pure real fmal(real x, real y, real z) { return fma(cast(double) x, cast(double) y, cast(double) z); }
4368 else
4371 double acos(double x);
4373 float acosf(float x);
4375 real acosl(real x);
4378 double asin(double x);
4380 float asinf(float x);
4382 real asinl(real x);
4385 pure double atan(double x);
4387 pure float atanf(float x);
4389 pure real atanl(real x);
4392 double atan2(double y, double x);
4394 float atan2f(float y, float x);
4396 real atan2l(real y, real x);
4399 pure double cos(double x);
4401 pure float cosf(float x);
4403 pure real cosl(real x);
4406 pure double sin(double x);
4408 pure float sinf(float x);
4410 pure real sinl(real x);
4413 pure double tan(double x);
4415 pure float tanf(float x);
4417 pure real tanl(real x);
4420 double acosh(double x);
4422 float acoshf(float x);
4424 real acoshl(real x);
4427 pure double asinh(double x);
4429 pure float asinhf(float x);
4431 pure real asinhl(real x);
4434 double atanh(double x);
4436 float atanhf(float x);
4438 real atanhl(real x);
4441 double cosh(double x);
4443 float coshf(float x);
4445 real coshl(real x);
4448 double sinh(double x);
4450 float sinhf(float x);
4452 real sinhl(real x);
4455 pure double tanh(double x);
4457 pure float tanhf(float x);
4459 pure real tanhl(real x);
4462 double exp(double x);
4464 float expf(float x);
4466 real expl(real x);
4469 double exp2(double x);
4471 float exp2f(float x);
4473 real exp2l(real x);
4476 double expm1(double x);
4478 float expm1f(float x);
4480 real expm1l(real x);
4483 pure double frexp(double value, int* exp);
4485 pure float frexpf(float value, int* exp);
4487 pure real frexpl(real value, int* exp);
4490 int ilogb(double x);
4492 int ilogbf(float x);
4494 int ilogbl(real x);
4497 double ldexp(double x, int exp);
4499 float ldexpf(float x, int exp);
4501 real ldexpl(real x, int exp);
4504 double log(double x);
4506 float logf(float x);
4508 real logl(real x);
4511 double log10(double x);
4513 float log10f(float x);
4515 real log10l(real x);
4518 double log1p(double x);
4520 float log1pf(float x);
4522 real log1pl(real x);
4525 double log2(double x);
4527 float log2f(float x);
4529 real log2l(real x);
4532 double logb(double x);
4534 float logbf(float x);
4536 real logbl(real x);
4539 pure double modf(double value, double* iptr);
4541 pure float modff(float value, float* iptr);
4543 pure real modfl(real value, real *iptr);
4546 double scalbn(double x, int n);
4548 float scalbnf(float x, int n);
4550 real scalbnl(real x, int n);
4553 double scalbln(double x, c_long n);
4555 float scalblnf(float x, c_long n);
4557 real scalblnl(real x, c_long n);
4560 pure double cbrt(double x);
4562 pure float cbrtf(float x);
4564 pure real cbrtl(real x);
4567 pure double fabs(double x);
4568 version (CRuntime_Microsoft)
4571 else
4574 pure float fabsf(float x);
4576 pure real fabsl(real x);
4580 double hypot(double x, double y);
4582 float hypotf(float x, float y);
4584 real hypotl(real x, real y);
4587 double pow(double x, double y);
4589 float powf(float x, float y);
4591 real powl(real x, real y);
4594 double sqrt(double x);
4596 float sqrtf(float x);
4598 real sqrtl(real x);
4601 pure double erf(double x);
4603 pure float erff(float x);
4605 pure real erfl(real x);
4608 double erfc(double x);
4610 float erfcf(float x);
4612 real erfcl(real x);
4615 double lgamma(double x);
4617 float lgammaf(float x);
4619 real lgammal(real x);
4622 double tgamma(double x);
4624 float tgammaf(float x);
4626 real tgammal(real x);
4629 pure double ceil(double x);
4631 pure float ceilf(float x);
4633 pure real ceill(real x);
4636 pure double floor(double x);
4638 pure float floorf(float x);
4640 pure real floorl(real x);
4643 pure double nearbyint(double x);
4645 pure float nearbyintf(float x);
4647 pure real nearbyintl(real x);
4650 pure double rint(double x);
4652 pure float rintf(float x);
4654 pure real rintl(real x);
4657 c_long lrint(double x);
4659 c_long lrintf(float x);
4661 c_long lrintl(real x);
4664 long llrint(double x);
4666 long llrintf(float x);
4668 long llrintl(real x);
4671 pure double round(double x);
4673 pure float roundf(float x);
4675 pure real roundl(real x);
4678 c_long lround(double x);
4680 c_long lroundf(float x);
4682 c_long lroundl(real x);
4685 long llround(double x);
4687 long llroundf(float x);
4689 long llroundl(real x);
4692 pure double trunc(double x);
4694 pure float truncf(float x);
4696 pure real truncl(real x);
4699 double fmod(double x, double y);
4701 float fmodf(float x, float y);
4703 real fmodl(real x, real y);
4706 double remainder(double x, double y);
4708 float remainderf(float x, float y);
4710 real remainderl(real x, real y);
4713 double remquo(double x, double y, int* quo);
4715 float remquof(float x, float y, int* quo);
4717 real remquol(real x, real y, int* quo);
4720 pure double copysign(double x, double y);
4722 pure float copysignf(float x, float y);
4724 pure real copysignl(real x, real y);
4727 pure double nan(char* tagp);
4729 pure float nanf(char* tagp);
4731 pure real nanl(char* tagp);
4734 double nextafter(double x, double y);
4736 float nextafterf(float x, float y);
4738 real nextafterl(real x, real y);
4741 double nexttoward(double x, real y);
4743 float nexttowardf(float x, real y);
4745 real nexttowardl(real x, real y);
4748 double fdim(double x, double y);
4750 float fdimf(float x, float y);
4752 real fdiml(real x, real y);
4755 pure double fmax(double x, double y);
4757 pure float fmaxf(float x, float y);
4759 pure real fmaxl(real x, real y);
4762 pure double fmin(double x, double y);
4764 pure float fminf(float x, float y);
4766 pure real fminl(real x, real y);
4769 pure double fma(double x, double y, double z);
4771 pure float fmaf(float x, float y, float z);
4773 pure real fmal(real x, real y, real z);