"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/druntime/src/core/stdc/math.d" (20 Nov 2020, 109053 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * D header file for C99.
    3  *
    4  * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_math.h.html, _math.h)
    5  *
    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)
   12  */
   13 
   14 module core.stdc.math;
   15 
   16 private import core.stdc.config;
   17 
   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;
   26 
   27 version (ARM)     version = ARM_Any;
   28 version (AArch64) version = ARM_Any;
   29 version (HPPA)    version = HPPA_Any;
   30 version (MIPS32)  version = MIPS_Any;
   31 version (MIPS64)  version = MIPS_Any;
   32 version (PPC)     version = PPC_Any;
   33 version (PPC64)   version = PPC_Any;
   34 version (RISCV32) version = RISCV_Any;
   35 version (RISCV64) version = RISCV_Any;
   36 version (S390)    version = IBMZ_Any;
   37 version (SPARC)   version = SPARC_Any;
   38 version (SPARC64) version = SPARC_Any;
   39 version (SystemZ) version = IBMZ_Any;
   40 version (X86)     version = X86_Any;
   41 version (X86_64)  version = X86_Any;
   42 
   43 extern (C):
   44 @trusted: // All functions here operate on floating point and integer values only.
   45 nothrow:
   46 @nogc:
   47 
   48 ///
   49 alias float  float_t;
   50 ///
   51 alias double double_t;
   52 
   53 ///
   54 enum double HUGE_VAL      = double.infinity;
   55 ///
   56 enum double HUGE_VALF     = float.infinity;
   57 ///
   58 enum double HUGE_VALL     = real.infinity;
   59 
   60 ///
   61 enum float INFINITY       = float.infinity;
   62 ///
   63 enum float NAN            = float.nan;
   64 
   65 version (FreeBSD)
   66 {
   67     ///
   68     enum int FP_ILOGB0        = -int.max;
   69     ///
   70     enum int FP_ILOGBNAN      = int.max;
   71 }
   72 else version (NetBSD)
   73 {
   74     ///
   75     enum int FP_ILOGB0        = -int.max;
   76     ///
   77     enum int FP_ILOGBNAN      = int.max;
   78 }
   79 else version (OpenBSD)
   80 {
   81     ///
   82     enum int FP_ILOGB0        = -int.max;
   83     ///
   84     enum int FP_ILOGBNAN      = int.max;
   85 }
   86 else version (DragonFlyBSD)
   87 {
   88     ///
   89     enum int FP_ILOGB0        = -int.max;
   90     ///
   91     enum int FP_ILOGBNAN      = int.max;
   92 }
   93 else version (CRuntime_Bionic)
   94 {
   95     ///
   96     enum int FP_ILOGB0        = -int.max;
   97     ///
   98     enum int FP_ILOGBNAN      = int.max;
   99 }
  100 else version (CRuntime_UClibc)
  101 {
  102     version (X86)
  103     {
  104         ///
  105         enum int FP_ILOGB0        = int.min;
  106         ///
  107         enum int FP_ILOGBNAN      = int.min;
  108     }
  109     else version (X86_64)
  110     {
  111         ///
  112         enum int FP_ILOGB0        = int.min;
  113         ///
  114         enum int FP_ILOGBNAN      = int.min;
  115     }
  116     else version (MIPS32)
  117     {
  118         ///
  119         enum int FP_ILOGB0        = -int.max;
  120         ///
  121         enum int FP_ILOGBNAN      = int.max;
  122     }
  123     else version (ARM)
  124     {
  125         ///
  126         enum int FP_ILOGB0        = -int.max;
  127         ///
  128         enum int FP_ILOGBNAN      = int.max;
  129     }
  130     else
  131     {
  132         static assert(false, "Architecture not supported.");
  133     }
  134 }
  135 else version (CRuntime_Glibc)
  136 {
  137     version (X86_Any)
  138     {
  139         ///
  140         enum int FP_ILOGB0        = int.min;
  141         ///
  142         enum int FP_ILOGBNAN      = int.min;
  143     }
  144     else version (ARM_Any)
  145     {
  146         ///
  147         enum int FP_ILOGB0        = -int.max;
  148         ///
  149         enum int FP_ILOGBNAN      = int.max;
  150     }
  151     else version (HPPA_Any)
  152     {
  153         ///
  154         enum int FP_ILOGB0        = -int.max;
  155         ///
  156         enum int FP_ILOGBNAN      = int.max;
  157     }
  158     else version (MIPS_Any)
  159     {
  160         ///
  161         enum int FP_ILOGB0        = -int.max;
  162         ///
  163         enum int FP_ILOGBNAN      = int.max;
  164     }
  165     else version (PPC_Any)
  166     {
  167         ///
  168         enum int FP_ILOGB0        = -int.max;
  169         ///
  170         enum int FP_ILOGBNAN      = int.max;
  171     }
  172     else version (RISCV_Any)
  173     {
  174         ///
  175         enum int FP_ILOGB0        = -int.max;
  176         ///
  177         enum int FP_ILOGBNAN      = int.max;
  178     }
  179     else version (SPARC_Any)
  180     {
  181         ///
  182         enum int FP_ILOGB0        = -int.max;
  183         ///
  184         enum int FP_ILOGBNAN      = int.max;
  185     }
  186     else version (IBMZ_Any)
  187     {
  188         ///
  189         enum int FP_ILOGB0        = -int.max;
  190         ///
  191         enum int FP_ILOGBNAN      = int.max;
  192     }
  193     else
  194     {
  195         static assert(false, "Architecture not supported.");
  196     }
  197 }
  198 else
  199 {
  200     ///
  201     enum int FP_ILOGB0        = int.min;
  202     ///
  203     enum int FP_ILOGBNAN      = int.min;
  204 }
  205 
  206 ///
  207 enum int MATH_ERRNO       = 1;
  208 ///
  209 enum int MATH_ERREXCEPT   = 2;
  210 ///
  211 enum int math_errhandling = MATH_ERRNO | MATH_ERREXCEPT;
  212 
  213 version (none)
  214 {
  215     //
  216     // these functions are all macros in C
  217     //
  218 
  219     //int fpclassify(real-floating x);
  220     pure int fpclassify(float x);
  221     pure int fpclassify(double x);
  222     pure int fpclassify(real x);
  223 
  224     //int isfinite(real-floating x);
  225     pure int isfinite(float x);
  226     pure int isfinite(double x);
  227     pure int isfinite(real x);
  228 
  229     //int isinf(real-floating x);
  230     pure int isinf(float x);
  231     pure int isinf(double x);
  232     pure int isinf(real x);
  233 
  234     //int isnan(real-floating x);
  235     pure int isnan(float x);
  236     pure int isnan(double x);
  237     pure int isnan(real x);
  238 
  239     //int isnormal(real-floating x);
  240     pure int isnormal(float x);
  241     pure int isnormal(double x);
  242     pure int isnormal(real x);
  243 
  244     //int signbit(real-floating x);
  245     pure int signbit(float x);
  246     pure int signbit(double x);
  247     pure int signbit(real x);
  248 
  249     //int isgreater(real-floating x, real-floating y);
  250     pure int isgreater(float x, float y);
  251     pure int isgreater(double x, double y);
  252     pure int isgreater(real x, real y);
  253 
  254     //int isgreaterequal(real-floating x, real-floating y);
  255     pure int isgreaterequal(float x, float y);
  256     pure int isgreaterequal(double x, double y);
  257     pure int isgreaterequal(real x, real y);
  258 
  259     //int isless(real-floating x, real-floating y);
  260     pure int isless(float x, float y);
  261     pure int isless(double x, double y);
  262     pure int isless(real x, real y);
  263 
  264     //int islessequal(real-floating x, real-floating y);
  265     pure int islessequal(float x, float y);
  266     pure int islessequal(double x, double y);
  267     pure int islessequal(real x, real y);
  268 
  269     //int islessgreater(real-floating x, real-floating y);
  270     pure int islessgreater(float x, float y);
  271     pure int islessgreater(double x, double y);
  272     pure int islessgreater(real x, real y);
  273 
  274     //int isunordered(real-floating x, real-floating y);
  275     pure int isunordered(float x, float y);
  276     pure int isunordered(double x, double y);
  277     pure int isunordered(real x, real y);
  278 }
  279 
  280 version (CRuntime_DigitalMars)
  281 {
  282     enum
  283     {
  284         ///
  285         FP_NANS        = 0,
  286         ///
  287         FP_NANQ        = 1,
  288         ///
  289         FP_INFINITE    = 2,
  290         ///
  291         FP_NORMAL      = 3,
  292         ///
  293         FP_SUBNORMAL   = 4,
  294         ///
  295         FP_ZERO        = 5,
  296         ///
  297         FP_NAN         = FP_NANQ,
  298         ///
  299         FP_EMPTY       = 6,
  300         ///
  301         FP_UNSUPPORTED = 7,
  302     }
  303 
  304     enum
  305     {
  306         ///
  307         FP_FAST_FMA  = 0,
  308         ///
  309         FP_FAST_FMAF = 0,
  310         ///
  311         FP_FAST_FMAL = 0,
  312     }
  313 
  314     pure uint __fpclassify_f(float x);
  315     pure uint __fpclassify_d(double x);
  316     pure uint __fpclassify_ld(real x);
  317 
  318   extern (D)
  319   {
  320     //int fpclassify(real-floating x);
  321     ///
  322     pure int fpclassify(float x)     { return __fpclassify_f(x); }
  323     ///
  324     pure int fpclassify(double x)    { return __fpclassify_d(x); }
  325     ///
  326     pure int fpclassify(real x)
  327     {
  328         return (real.sizeof == double.sizeof)
  329             ? __fpclassify_d(x)
  330             : __fpclassify_ld(x);
  331     }
  332 
  333     //int isfinite(real-floating x);
  334     ///
  335     pure int isfinite(float x)       { return fpclassify(x) >= FP_NORMAL; }
  336     ///
  337     pure int isfinite(double x)      { return fpclassify(x) >= FP_NORMAL; }
  338     ///
  339     pure int isfinite(real x)        { return fpclassify(x) >= FP_NORMAL; }
  340 
  341     //int isinf(real-floating x);
  342     ///
  343     pure int isinf(float x)          { return fpclassify(x) == FP_INFINITE; }
  344     ///
  345     pure int isinf(double x)         { return fpclassify(x) == FP_INFINITE; }
  346     ///
  347     pure int isinf(real x)           { return fpclassify(x) == FP_INFINITE; }
  348 
  349     //int isnan(real-floating x);
  350     ///
  351     pure int isnan(float x)          { return fpclassify(x) <= FP_NANQ;   }
  352     ///
  353     pure int isnan(double x)         { return fpclassify(x) <= FP_NANQ;   }
  354     ///
  355     pure int isnan(real x)           { return fpclassify(x) <= FP_NANQ;   }
  356 
  357     //int isnormal(real-floating x);
  358     ///
  359     pure int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
  360     ///
  361     pure int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
  362     ///
  363     pure int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
  364 
  365     //int signbit(real-floating x);
  366     ///
  367     pure int signbit(float x)     { return (cast(short*)&(x))[1] & 0x8000; }
  368     ///
  369     pure int signbit(double x)    { return (cast(short*)&(x))[3] & 0x8000; }
  370     ///
  371     pure int signbit(real x)
  372     {
  373         return (real.sizeof == double.sizeof)
  374             ? (cast(short*)&(x))[3] & 0x8000
  375             : (cast(short*)&(x))[4] & 0x8000;
  376     }
  377   }
  378 }
  379 else version (CRuntime_Microsoft) // fully supported since MSVCRT 12 (VS 2013) only
  380 {
  381   version (all) // legacy stuff to be removed in the future
  382   {
  383     enum
  384     {
  385         _FPCLASS_SNAN = 1,
  386         _FPCLASS_QNAN = 2,
  387         _FPCLASS_NINF = 4,
  388         _FPCLASS_NN   = 8,
  389         _FPCLASS_ND   = 0x10,
  390         _FPCLASS_NZ   = 0x20,
  391         _FPCLASS_PZ   = 0x40,
  392         _FPCLASS_PD   = 0x80,
  393         _FPCLASS_PN   = 0x100,
  394         _FPCLASS_PINF = 0x200,
  395     }
  396 
  397     //deprecated("Please use the standard C99 function copysignf() instead.")
  398     pure float _copysignf(float x, float s);
  399 
  400     //deprecated("_chgsignf(x) is a non-standard MS extension. Please consider using -x instead.")
  401     pure float _chgsignf(float x);
  402 
  403     version (Win64) // not available in 32-bit runtimes
  404     {
  405         //deprecated("Please use the standard C99 function isfinite() instead.")
  406         pure int _finitef(float x);
  407 
  408         //deprecated("Please use the standard C99 function isnan() instead.")
  409         pure int _isnanf(float x);
  410 
  411         //deprecated("Please use the standard C99 function fpclassify() instead.")
  412         pure int _fpclassf(float x);
  413     }
  414 
  415     //deprecated("Please use the standard C99 function copysign() instead.")
  416     pure double _copysign(double x, double s);
  417 
  418     //deprecated("_chgsign(x) is a non-standard MS extension. Please consider using -x instead.")
  419     pure double _chgsign(double x);
  420 
  421     //deprecated("Please use the standard C99 function isfinite() instead.")
  422     pure int _finite(double x);
  423 
  424     //deprecated("Please use the standard C99 function isnan() instead.")
  425     pure int _isnan(double x);
  426 
  427     //deprecated("Please use the standard C99 function fpclassify() instead.")
  428     pure int _fpclass(double x);
  429   }
  430 
  431     enum
  432     {
  433         ///
  434         FP_SUBNORMAL = -2,
  435         ///
  436         FP_NORMAL    = -1,
  437         ///
  438         FP_ZERO      =  0,
  439         ///
  440         FP_INFINITE  =  1,
  441         ///
  442         FP_NAN       =  2,
  443     }
  444 
  445     pure private short _fdclass(float x);
  446     pure private short _dclass(double x);
  447 
  448     pure private int _fdsign(float x);
  449     pure private int _dsign(double x);
  450 
  451   extern(D)
  452   {
  453     //int fpclassify(real-floating x);
  454     ///
  455     pure int fpclassify()(float x)   { return _fdclass(x); }
  456     ///
  457     pure int fpclassify()(double x)  { return _dclass(x);  }
  458     ///
  459     pure int fpclassify()(real x)
  460     {
  461         static if (real.sizeof == double.sizeof)
  462             return _dclass(cast(double) x);
  463         else
  464             static assert(false, "fpclassify(real) not supported by MS C runtime");
  465     }
  466 
  467     //int isfinite(real-floating x);
  468     ///
  469     pure int isfinite()(float x)     { return fpclassify(x) <= 0; }
  470     ///
  471     pure int isfinite()(double x)    { return fpclassify(x) <= 0; }
  472     ///
  473     pure int isfinite()(real x)      { return fpclassify(x) <= 0; }
  474 
  475     //int isinf(real-floating x);
  476     ///
  477     pure int isinf()(float x)        { return fpclassify(x) == FP_INFINITE; }
  478     ///
  479     pure int isinf()(double x)       { return fpclassify(x) == FP_INFINITE; }
  480     ///
  481     pure int isinf()(real x)         { return fpclassify(x) == FP_INFINITE; }
  482 
  483     //int isnan(real-floating x);
  484     version (none) // requires MSVCRT 12+ (VS 2013)
  485     {
  486         ///
  487         pure int isnan(float x)      { return fpclassify(x) == FP_NAN; }
  488         ///
  489         pure int isnan(double x)     { return fpclassify(x) == FP_NAN; }
  490         ///
  491         pure int isnan(real x)       { return fpclassify(x) == FP_NAN; }
  492     }
  493     else // for backward compatibility with older runtimes
  494     {
  495         ///
  496         pure int isnan(float x)      { version (Win64) return _isnanf(x); else return _isnan(cast(double) x); }
  497         ///
  498         pure int isnan(double x)     { return _isnan(x); }
  499         ///
  500         pure int isnan(real x)       { return _isnan(cast(double) x); }
  501     }
  502 
  503     //int isnormal(real-floating x);
  504     ///
  505     pure int isnormal()(float x)     { return fpclassify(x) == FP_NORMAL; }
  506     ///
  507     pure int isnormal()(double x)    { return fpclassify(x) == FP_NORMAL; }
  508     ///
  509     pure int isnormal()(real x)      { return fpclassify(x) == FP_NORMAL; }
  510 
  511     //int signbit(real-floating x);
  512     ///
  513     pure int signbit()(float x)   { return _fdsign(x); }
  514     ///
  515     pure int signbit()(double x)  { return _dsign(x);  }
  516     ///
  517     pure int signbit()(real x)
  518     {
  519         static if (real.sizeof == double.sizeof)
  520             return _dsign(cast(double) x);
  521         else
  522             return (cast(short*)&(x))[4] & 0x8000;
  523     }
  524   }
  525 }
  526 else version (CRuntime_Glibc)
  527 {
  528     enum
  529     {
  530         ///
  531         FP_NAN,
  532         ///
  533         FP_INFINITE,
  534         ///
  535         FP_ZERO,
  536         ///
  537         FP_SUBNORMAL,
  538         ///
  539         FP_NORMAL,
  540     }
  541 
  542     enum
  543     {
  544         ///
  545         FP_FAST_FMA  = 0,
  546         ///
  547         FP_FAST_FMAF = 0,
  548         ///
  549         FP_FAST_FMAL = 0,
  550     }
  551 
  552     pure int __fpclassifyf(float x);
  553     pure int __fpclassify(double x);
  554     pure int __fpclassifyl(real x);
  555 
  556     pure int __finitef(float x);
  557     pure int __finite(double x);
  558     pure int __finitel(real x);
  559 
  560     pure int __isinff(float x);
  561     pure int __isinf(double x);
  562     pure int __isinfl(real x);
  563 
  564     pure int __isnanf(float x);
  565     pure int __isnan(double x);
  566     pure int __isnanl(real x);
  567 
  568     pure int __signbitf(float x);
  569     pure int __signbit(double x);
  570     pure int __signbitl(real x);
  571 
  572   extern (D)
  573   {
  574     //int fpclassify(real-floating x);
  575       ///
  576     pure int fpclassify(float x)     { return __fpclassifyf(x); }
  577     ///
  578     pure int fpclassify(double x)    { return __fpclassify(x);  }
  579     ///
  580     pure int fpclassify(real x)
  581     {
  582         return (real.sizeof == double.sizeof)
  583             ? __fpclassify(x)
  584             : __fpclassifyl(x);
  585     }
  586 
  587     //int isfinite(real-floating x);
  588     ///
  589     pure int isfinite(float x)       { return __finitef(x); }
  590     ///
  591     pure int isfinite(double x)      { return __finite(x);  }
  592     ///
  593     pure int isfinite(real x)
  594     {
  595         return (real.sizeof == double.sizeof)
  596             ? __finite(x)
  597             : __finitel(x);
  598     }
  599 
  600     //int isinf(real-floating x);
  601     ///
  602     pure int isinf(float x)          { return __isinff(x);  }
  603     ///
  604     pure int isinf(double x)         { return __isinf(x);   }
  605     ///
  606     pure int isinf(real x)
  607     {
  608         return (real.sizeof == double.sizeof)
  609             ? __isinf(x)
  610             : __isinfl(x);
  611     }
  612 
  613     //int isnan(real-floating x);
  614     ///
  615     pure int isnan(float x)          { return __isnanf(x);  }
  616     ///
  617     pure int isnan(double x)         { return __isnan(x);   }
  618     ///
  619     pure int isnan(real x)
  620     {
  621         return (real.sizeof == double.sizeof)
  622             ? __isnan(x)
  623             : __isnanl(x);
  624     }
  625 
  626     //int isnormal(real-floating x);
  627     ///
  628     pure int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
  629     ///
  630     pure int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
  631     ///
  632     pure int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
  633 
  634     //int signbit(real-floating x);
  635     ///
  636     pure int signbit(float x)     { return __signbitf(x); }
  637     ///
  638     pure int signbit(double x)    { return __signbit(x);  }
  639     ///
  640     pure int signbit(real x)
  641     {
  642         return (real.sizeof == double.sizeof)
  643             ? __signbit(x)
  644             : __signbitl(x);
  645     }
  646   }
  647 }
  648 else version (CRuntime_Musl)
  649 {
  650     enum
  651     {
  652         ///
  653         FP_NAN,
  654         ///
  655         FP_INFINITE,
  656         ///
  657         FP_ZERO,
  658         ///
  659         FP_SUBNORMAL,
  660         ///
  661         FP_NORMAL,
  662     }
  663 
  664     enum
  665     {
  666         ///
  667         FP_FAST_FMA  = 0,
  668         ///
  669         FP_FAST_FMAF = 0,
  670         ///
  671         FP_FAST_FMAL = 0,
  672     }
  673 
  674   pure {
  675     int __fpclassifyf(float x);
  676     int __fpclassify(double x);
  677     int __fpclassifyl(real x);
  678 
  679     int __signbitf(float x);
  680     int __signbit(double x);
  681     int __signbitl(real x);
  682   }
  683 
  684   extern (D) pure
  685   {
  686     //int fpclassify(real-floating x);
  687       ///
  688     int fpclassify(float x)     { return __fpclassifyf(x); }
  689     ///
  690     int fpclassify(double x)    { return __fpclassify(x);  }
  691     ///
  692     int fpclassify(real x)
  693     {
  694         return (real.sizeof == double.sizeof)
  695             ? __fpclassify(x)
  696             : __fpclassifyl(x);
  697     }
  698     private uint __FLOAT_BITS(float __f)
  699     {
  700         union __u_t {
  701             float __f;
  702             uint __i;
  703         }
  704         __u_t __u;
  705         __u.__f = __f;
  706         return __u.__i;
  707     }
  708     private ulong __DOUBLE_BITS(double __f)
  709     {
  710         union __u_t {
  711             double __f;
  712             ulong __i;
  713         }
  714         __u_t __u;
  715         __u.__f = __f;
  716         return __u.__i;
  717     }
  718 
  719     //int isfinite(real-floating x);
  720     ///
  721     int isfinite(float x)       { return (__FLOAT_BITS(x) & 0x7fffffff) < 0x7f800000; }
  722     ///
  723     int isfinite(double x)      { return (__DOUBLE_BITS(x) & -1UL>>1) < 0x7ffUL<<52;  }
  724     ///
  725     int isfinite(real x)
  726     {
  727         return (real.sizeof == double.sizeof)
  728             ? isfinite(cast(double)x)
  729             : __fpclassifyl(x) > FP_INFINITE;
  730     }
  731 
  732     //int isinf(real-floating x);
  733     ///
  734     int isinf(float x)          { return (__FLOAT_BITS(x) & 0x7fffffff) == 0x7f800000;  }
  735     ///
  736     int isinf(double x)         { return (__DOUBLE_BITS(x) & -1UL>>1) == 0x7ffUL<<52;   }
  737     ///
  738     int isinf(real x)
  739     {
  740         return (real.sizeof == double.sizeof)
  741             ? isinf(cast(double)x)
  742             : __fpclassifyl(x) == FP_INFINITE;
  743     }
  744 
  745     //int isnan(real-floating x);
  746     ///
  747     int isnan(float x)          { return (__FLOAT_BITS(x) & 0x7fffffff) > 0x7f800000;  }
  748     ///
  749     int isnan(double x)         { return (__DOUBLE_BITS(x) & -1UL>>1) > 0x7ffUL<<52;   }
  750     ///
  751     int isnan(real x)
  752     {
  753         return (real.sizeof == double.sizeof)
  754             ? isnan(cast(double)x)
  755             : __fpclassifyl(x) == FP_NAN;
  756     }
  757 
  758     //int isnormal(real-floating x);
  759     ///
  760     int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
  761     ///
  762     int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
  763     ///
  764     int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
  765 
  766     //int signbit(real-floating x);
  767     ///
  768     int signbit(float x)     { return __signbitf(x); }
  769     ///
  770     int signbit(double x)    { return __signbit(x);  }
  771     ///
  772     int signbit(real x)
  773     {
  774         return (real.sizeof == double.sizeof)
  775             ? __signbit(x)
  776             : __signbitl(x);
  777     }
  778   }
  779 }
  780 else version (CRuntime_UClibc)
  781 {
  782     enum
  783     {
  784         ///
  785         FP_NAN,
  786         ///
  787         FP_INFINITE,
  788         ///
  789         FP_ZERO,
  790         ///
  791         FP_SUBNORMAL,
  792         ///
  793         FP_NORMAL,
  794     }
  795 
  796     enum
  797     {
  798         ///
  799         FP_FAST_FMA  = 0,
  800         ///
  801         FP_FAST_FMAF = 0,
  802         ///
  803         FP_FAST_FMAL = 0,
  804     }
  805 
  806     int __fpclassifyf(float x);
  807     int __fpclassify(double x);
  808     int __fpclassifyl(real x);
  809 
  810     int __finitef(float x);
  811     int __finite(double x);
  812     int __finitel(real x);
  813 
  814     int __isinff(float x);
  815     int __isinf(double x);
  816     int __isinfl(real x);
  817 
  818     int __isnanf(float x);
  819     int __isnan(double x);
  820     int __isnanl(real x);
  821 
  822     int __signbitf(float x);
  823     int __signbit(double x);
  824     int __signbitl(real x);
  825 
  826   extern (D)
  827   {
  828     ///
  829     int fpclassify(float x)     { return __fpclassifyf(x); }
  830     ///
  831     int fpclassify(double x)    { return __fpclassify(x);  }
  832     ///
  833     int fpclassify(real x)
  834     {
  835         return (real.sizeof == double.sizeof)
  836             ? __fpclassify(x)
  837             : __fpclassifyl(x);
  838     }
  839 
  840     ///
  841     int isfinite(float x)       { return __finitef(x); }
  842     ///
  843     int isfinite(double x)      { return __finite(x);  }
  844     ///
  845     int isfinite(real x)
  846     {
  847         return (real.sizeof == double.sizeof)
  848             ? __finite(x)
  849             : __finitel(x);
  850     }
  851 
  852     ///
  853     int isinf(float x)          { return __isinff(x);  }
  854     ///
  855     int isinf(double x)         { return __isinf(x);   }
  856     ///
  857     int isinf(real x)
  858     {
  859         return (real.sizeof == double.sizeof)
  860             ? __isinf(x)
  861             : __isinfl(x);
  862     }
  863 
  864     ///
  865     int isnan(float x)          { return __isnanf(x);  }
  866     ///
  867     int isnan(double x)         { return __isnan(x);   }
  868     ///
  869     int isnan(real x)
  870     {
  871         return (real.sizeof == double.sizeof)
  872             ? __isnan(x)
  873             : __isnanl(x);
  874     }
  875 
  876     ///
  877     int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
  878     ///
  879     int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
  880     ///
  881     int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
  882 
  883     ///
  884     int signbit(float x)     { return __signbitf(x); }
  885     ///
  886     int signbit(double x)    { return __signbit(x);  }
  887     ///
  888     int signbit(real x)
  889     {
  890         return (real.sizeof == double.sizeof)
  891             ? __signbit(x)
  892             : __signbitl(x);
  893     }
  894   }
  895 }
  896 else version (MinGW)
  897 {
  898     enum
  899     {
  900         ///
  901         FP_NAN = 0x0100,
  902         ///
  903         FP_NORMAL = 0x0400,
  904         ///
  905         FP_INFINITE = FP_NAN | FP_NORMAL,
  906         ///
  907         FP_ZERO = 0x0400,
  908         ///
  909         FP_SUBNORMAL = FP_NORMAL | FP_ZERO
  910     }
  911 
  912     pure int __fpclassifyf(float x);
  913     pure int __fpclassify(double x);
  914     pure int __fpclassifyl(real x);
  915 
  916     pure int __isnanf(float x);
  917     pure int __isnan(double x);
  918     pure int __isnanl(real x);
  919 
  920     pure int __signbitf(float x);
  921     pure int __signbit(double x);
  922     pure int __signbitl(real x);
  923 
  924   extern (D)
  925   {
  926     //int fpclassify(real-floating x);
  927       ///
  928     pure int fpclassify(float x)     { return __fpclassifyf(x); }
  929     ///
  930     pure int fpclassify(double x)    { return __fpclassify(x);  }
  931     ///
  932     pure int fpclassify(real x)
  933     {
  934         return (real.sizeof == double.sizeof)
  935             ? __fpclassify(x)
  936             : __fpclassifyl(x);
  937     }
  938 
  939     //int isfinite(real-floating x);
  940     ///
  941     pure int isfinite(float x)       { return (fpclassify(x) & FP_NORMAL) == 0; }
  942     ///
  943     pure int isfinite(double x)      { return (fpclassify(x) & FP_NORMAL) == 0; }
  944     ///
  945     pure int isfinite(real x)        { return (fpclassify(x) & FP_NORMAL) == 0; }
  946 
  947     //int isinf(real-floating x);
  948     ///
  949     pure int isinf(float x)          { return fpclassify(x) == FP_INFINITE; }
  950     ///
  951     pure int isinf(double x)         { return fpclassify(x) == FP_INFINITE; }
  952     ///
  953     pure int isinf(real x)           { return fpclassify(x) == FP_INFINITE; }
  954 
  955     //int isnan(real-floating x);
  956     ///
  957     pure int isnan(float x)          { return __isnanf(x);  }
  958     ///
  959     pure int isnan(double x)         { return __isnan(x);   }
  960     ///
  961     pure int isnan(real x)
  962     {
  963         return (real.sizeof == double.sizeof)
  964             ? __isnan(x)
  965             : __isnanl(x);
  966     }
  967 
  968     //int isnormal(real-floating x);
  969     ///
  970     int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
  971     ///
  972     int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
  973     ///
  974     int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
  975 
  976     //int signbit(real-floating x);
  977     ///
  978     int signbit(float x)     { return __signbitf(x); }
  979     ///
  980     int signbit(double x)    { return __signbit(x);  }
  981     ///
  982     int signbit(real x)
  983     {
  984         return (real.sizeof == double.sizeof)
  985             ? __signbit(x)
  986             : __signbitl(x);
  987     }
  988   }
  989 }
  990 else version (Darwin)
  991 {
  992     enum
  993     {
  994         ///
  995         FP_NAN         = 1,
  996         ///
  997         FP_INFINITE    = 2,
  998         ///
  999         FP_ZERO        = 3,
 1000         ///
 1001         FP_NORMAL      = 4,
 1002         ///
 1003         FP_SUBNORMAL   = 5,
 1004     }
 1005 
 1006     enum
 1007     {
 1008         ///
 1009         FP_FAST_FMA  = 0,
 1010         ///
 1011         FP_FAST_FMAF = 0,
 1012         ///
 1013         FP_FAST_FMAL = 0,
 1014     }
 1015 
 1016     pure int __fpclassifyf(float x);
 1017     pure int __fpclassifyd(double x);
 1018 
 1019     pure int __isfinitef(float x);
 1020     pure int __isfinited(double x);
 1021 
 1022     pure int __isinff(float x);
 1023     pure int __isinfd(double x);
 1024 
 1025     pure int __isnanf(float x);
 1026     pure int __isnand(double x);
 1027 
 1028     // __isnormal family exists, but iOS implementation returns wrong results
 1029     // for subnormals
 1030 
 1031     pure int __signbitf(float x);
 1032     pure int __signbitd(double x);
 1033     pure int __signbitl(real x);
 1034 
 1035     // Support of OSX < 10.8 needs legacy function names without "l" suffix
 1036     // with exception of __signbitl.  Otherwise could use else version like
 1037     // other Darwins
 1038     version (OSX)
 1039     {
 1040         pure int __fpclassify(real x);
 1041         pure int __isfinite(real x);
 1042         pure int __isinf(real x);
 1043         pure int __isnan(real x);
 1044         alias __fpclassifyl = __fpclassify;
 1045         alias __isfinitel = __isfinite;
 1046         alias __isinfl = __isinf;
 1047         alias __isnanl = __isnan;
 1048     }
 1049     else
 1050     {
 1051         // Available OSX >= 10.8, iOS >= 6.0, all TVOS and WatchOS
 1052         pure int __fpclassifyl(real x);
 1053         pure int __isfinitel(real x);
 1054         pure int __isinfl(real x);
 1055         pure int __isnanl(real x);
 1056     }
 1057 
 1058   extern (D)
 1059   {
 1060     //int fpclassify(real-floating x);
 1061     ///
 1062     pure int fpclassify(float x)     { return __fpclassifyf(x); }
 1063     ///
 1064     pure int fpclassify(double x)    { return __fpclassifyd(x); }
 1065     ///
 1066     pure int fpclassify(real x)      { return __fpclassifyl(x); }
 1067 
 1068     //int isfinite(real-floating x);
 1069     ///
 1070     pure int isfinite(float x)       { return __isfinitef(x); }
 1071     ///
 1072     pure int isfinite(double x)      { return __isfinited(x); }
 1073     ///
 1074     pure int isfinite(real x)        { return __isfinitel(x); }
 1075 
 1076     //int isinf(real-floating x);
 1077     ///
 1078     pure int isinf(float x)          { return __isinff(x); }
 1079     ///
 1080     pure int isinf(double x)         { return __isinfd(x); }
 1081     ///
 1082     pure int isinf(real x)           { return __isinfl(x); }
 1083 
 1084     //int isnan(real-floating x);
 1085     ///
 1086     pure int isnan(float x)          { return __isnanf(x); }
 1087     ///
 1088     pure int isnan(double x)         { return __isnand(x); }
 1089     ///
 1090     pure int isnan(real x)           { return __isnanl(x); }
 1091 
 1092     //int isnormal(real-floating x);
 1093     ///
 1094     pure int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
 1095     ///
 1096     pure int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
 1097     ///
 1098     pure int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
 1099 
 1100     //int signbit(real-floating x);
 1101     ///
 1102     pure int signbit(float x)     { return __signbitf(x); }
 1103     ///
 1104     pure int signbit(double x)    { return __signbitd(x); }
 1105     ///
 1106     pure int signbit(real x)      { return __signbitl(x); }
 1107   }
 1108 }
 1109 else version (FreeBSD)
 1110 {
 1111     enum
 1112     {
 1113         ///
 1114         FP_INFINITE  = 0x01,
 1115         ///
 1116         FP_NAN       = 0x02,
 1117         ///
 1118         FP_NORMAL    = 0x04,
 1119         ///
 1120         FP_SUBNORMAL = 0x08,
 1121         ///
 1122         FP_ZERO      = 0x10,
 1123     }
 1124 
 1125     enum
 1126     {
 1127         ///
 1128         FP_FAST_FMA  = 0,
 1129         ///
 1130         FP_FAST_FMAF = 0,
 1131         ///
 1132         FP_FAST_FMAL = 0,
 1133     }
 1134 
 1135     pure int __fpclassifyd(double);
 1136     pure int __fpclassifyf(float);
 1137     pure int __fpclassifyl(real);
 1138     pure int __isfinitef(float);
 1139     pure int __isfinite(double);
 1140     pure int __isfinitel(real);
 1141     pure int __isinff(float);
 1142     pure int __isinfl(real);
 1143     pure int __isnanl(real);
 1144     pure int __isnormalf(float);
 1145     pure int __isnormal(double);
 1146     pure int __isnormall(real);
 1147     pure int __signbit(double);
 1148     pure int __signbitf(float);
 1149     pure int __signbitl(real);
 1150 
 1151   extern (D)
 1152   {
 1153     //int fpclassify(real-floating x);
 1154       ///
 1155     pure int fpclassify(float x)     { return __fpclassifyf(x); }
 1156     ///
 1157     pure int fpclassify(double x)    { return __fpclassifyd(x); }
 1158     ///
 1159     pure int fpclassify(real x)      { return __fpclassifyl(x); }
 1160 
 1161     //int isfinite(real-floating x);
 1162     ///
 1163     pure int isfinite(float x)       { return __isfinitef(x); }
 1164     ///
 1165     pure int isfinite(double x)      { return __isfinite(x); }
 1166     ///
 1167     pure int isfinite(real x)        { return __isfinitel(x); }
 1168 
 1169     //int isinf(real-floating x);
 1170     ///
 1171     pure int isinf(float x)          { return __isinff(x); }
 1172     ///
 1173     pure int isinf(double x)         { return __isinfl(x); }
 1174     ///
 1175     pure int isinf(real x)           { return __isinfl(x); }
 1176 
 1177     //int isnan(real-floating x);
 1178     ///
 1179     pure int isnan(float x)          { return __isnanl(x); }
 1180     ///
 1181     pure int isnan(double x)         { return __isnanl(x); }
 1182     ///
 1183     pure int isnan(real x)           { return __isnanl(x); }
 1184 
 1185     //int isnormal(real-floating x);
 1186     ///
 1187     pure int isnormal(float x)       { return __isnormalf(x); }
 1188     ///
 1189     pure int isnormal(double x)      { return __isnormal(x); }
 1190     ///
 1191     pure int isnormal(real x)        { return __isnormall(x); }
 1192 
 1193     //int signbit(real-floating x);
 1194     ///
 1195     pure int signbit(float x)        { return __signbitf(x); }
 1196     ///
 1197     pure int signbit(double x)       { return __signbit(x); }
 1198     ///
 1199     pure int signbit(real x)         { return __signbit(x); }
 1200   }
 1201 }
 1202 else version (OpenBSD)
 1203 {
 1204     enum
 1205     {
 1206         ///
 1207         FP_INFINITE  = 0x01,
 1208         ///
 1209         FP_NAN       = 0x02,
 1210         ///
 1211         FP_NORMAL    = 0x04,
 1212         ///
 1213         FP_SUBNORMAL = 0x08,
 1214         ///
 1215         FP_ZERO      = 0x10,
 1216     }
 1217 
 1218     enum
 1219     {
 1220         ///
 1221         FP_FAST_FMA  = 1,
 1222         ///
 1223         FP_FAST_FMAF = 1,
 1224         ///
 1225         FP_FAST_FMAL = 1,
 1226     }
 1227 
 1228     pure int __fpclassifyd(double);
 1229     pure int __fpclassifyf(float);
 1230     pure int __fpclassifyl(real);
 1231     pure int __isfinitef(float);
 1232     pure int __isfinite(double);
 1233     pure int __isfinitel(real);
 1234     pure int __isinff(float);
 1235     pure int __isinfl(real);
 1236     pure int __isnanl(real);
 1237     pure int __isnormalf(float);
 1238     pure int __isnormal(double);
 1239     pure int __isnormall(real);
 1240     pure int __signbit(double);
 1241     pure int __signbitf(float);
 1242     pure int __signbitl(real);
 1243 
 1244   extern (D)
 1245   {
 1246     //int fpclassify(real-floating x);
 1247       ///
 1248     pure int fpclassify(float x)     { return __fpclassifyf(x); }
 1249     ///
 1250     pure int fpclassify(double x)    { return __fpclassifyd(x); }
 1251     ///
 1252     pure int fpclassify(real x)      { return __fpclassifyl(x); }
 1253 
 1254     //int isfinite(real-floating x);
 1255     ///
 1256     pure int isfinite(float x)       { return __isfinitef(x); }
 1257     ///
 1258     pure int isfinite(double x)      { return __isfinite(x); }
 1259     ///
 1260     pure int isfinite(real x)        { return __isfinitel(x); }
 1261 
 1262     //int isinf(real-floating x);
 1263     ///
 1264     pure int isinf(float x)          { return __isinff(x); }
 1265     ///
 1266     pure int isinf(double x)         { return __isinfl(x); }
 1267     ///
 1268     pure int isinf(real x)           { return __isinfl(x); }
 1269 
 1270     //int isnan(real-floating x);
 1271     ///
 1272     pure int isnan(float x)          { return __isnanl(x); }
 1273     ///
 1274     pure int isnan(double x)         { return __isnanl(x); }
 1275     ///
 1276     pure int isnan(real x)           { return __isnanl(x); }
 1277 
 1278     //int isnormal(real-floating x);
 1279     ///
 1280     pure int isnormal(float x)       { return __isnormalf(x); }
 1281     ///
 1282     pure int isnormal(double x)      { return __isnormal(x); }
 1283     ///
 1284     pure int isnormal(real x)        { return __isnormall(x); }
 1285 
 1286     //int signbit(real-floating x);
 1287     ///
 1288     pure int signbit(float x)        { return __signbitf(x); }
 1289     ///
 1290     pure int signbit(double x)       { return __signbit(x); }
 1291     ///
 1292     pure int signbit(real x)         { return __signbit(x); }
 1293   }
 1294 }
 1295 else version (NetBSD)
 1296 {
 1297     enum
 1298     {
 1299         ///
 1300         FP_INFINITE    = 0,
 1301         ///
 1302         FP_NAN         = 1,
 1303         ///
 1304         FP_NORMAL      = 2,
 1305         ///
 1306         FP_SUBNORMAL   = 3,
 1307         ///
 1308         FP_ZERO        = 4,
 1309     }
 1310 
 1311     enum
 1312     {
 1313         ///
 1314         FP_FAST_FMA  = 0,
 1315         ///
 1316         FP_FAST_FMAF = 0,
 1317         ///
 1318         FP_FAST_FMAL = 0,
 1319     }
 1320 
 1321     pure uint __fpclassifyf(float x);
 1322     pure uint __fpclassifyd(double x);
 1323     pure uint __fpclassifyl(real x);
 1324 
 1325   extern (D)
 1326   {
 1327     //int fpclassify(real-floating x);
 1328     ///
 1329     pure int fpclassify(float x)     { return __fpclassifyf(x); }
 1330     ///
 1331     pure int fpclassify(double x)    { return __fpclassifyd(x); }
 1332     ///
 1333     pure int fpclassify(real x)
 1334     {
 1335         return (real.sizeof == double.sizeof)
 1336             ? __fpclassifyd(x)
 1337             : __fpclassifyl(x);
 1338     }
 1339 
 1340     //int isfinite(real-floating x);
 1341     ///
 1342     pure int isfinite(float x)       { return fpclassify(x) >= FP_NORMAL; }
 1343     ///
 1344     pure int isfinite(double x)      { return fpclassify(x) >= FP_NORMAL; }
 1345     ///
 1346     pure int isfinite(real x)        { return fpclassify(x) >= FP_NORMAL; }
 1347 
 1348     //int isinf(real-floating x);
 1349     ///
 1350     pure int isinf(float x)          { return fpclassify(x) == FP_INFINITE; }
 1351     ///
 1352     pure int isinf(double x)         { return fpclassify(x) == FP_INFINITE; }
 1353     ///
 1354     pure int isinf(real x)           { return fpclassify(x) == FP_INFINITE; }
 1355 
 1356     //int isnan(real-floating x);
 1357     ///
 1358     pure int isnan(float x)          { return fpclassify(x) == FP_NAN;   }
 1359     ///
 1360     pure int isnan(double x)         { return fpclassify(x) == FP_NAN;   }
 1361     ///
 1362     pure int isnan(real x)           { return fpclassify(x) == FP_NAN;   }
 1363 
 1364     //int isnormal(real-floating x);
 1365     ///
 1366     pure int isnormal(float x)       { return fpclassify(x) == FP_NORMAL; }
 1367     ///
 1368     pure int isnormal(double x)      { return fpclassify(x) == FP_NORMAL; }
 1369     ///
 1370     pure int isnormal(real x)        { return fpclassify(x) == FP_NORMAL; }
 1371 
 1372     //int signbit(real-floating x);
 1373     ///
 1374     pure int signbit(float x)     { return (cast(short*)&(x))[1] & 0x8000; }
 1375     ///
 1376     pure int signbit(double x)    { return (cast(short*)&(x))[3] & 0x8000; }
 1377     ///
 1378     pure int signbit(real x)
 1379     {
 1380         return (real.sizeof == double.sizeof)
 1381             ? (cast(short*)&(x))[3] & 0x8000
 1382             : (cast(short*)&(x))[4] & 0x8000;
 1383     }
 1384   }
 1385 }
 1386 else version (DragonFlyBSD)
 1387 {
 1388     enum
 1389     {
 1390         FP_INFINITE  = 0x01,
 1391         FP_NAN       = 0x02,
 1392         FP_NORMAL    = 0x04,
 1393         FP_SUBNORMAL = 0x08,
 1394         FP_ZERO      = 0x10,
 1395     }
 1396 
 1397     /*
 1398      * /usr/include/math.h : martynas@openbsd believes only F version is true.
 1399        enum FP_FAST_FMA  = 1;
 1400        enum FP_FAST_FMAL = 1;
 1401      */
 1402     enum  FP_FAST_FMAF = 1;
 1403 
 1404     pure int __fpclassifyd(double);
 1405     pure int __fpclassifyf(float);
 1406     pure int __fpclassifyl(real);
 1407     pure int __isfinitef(float);
 1408     pure int __isfinite(double);
 1409     pure int __isfinitel(real);
 1410     pure int __isinff(float);
 1411     pure int __isinf(double);
 1412     pure int __isinfl(real);
 1413     pure int __isnanf(float);
 1414     pure int __isnan(double);
 1415     pure int __isnanl(real);
 1416     pure int __isnormalf(float);
 1417     pure int __isnormal(double);
 1418     pure int __isnormall(real);
 1419     pure int __signbit(double);
 1420     pure int __signbitf(float);
 1421     pure int __signbitl(real);
 1422 
 1423   extern (D)
 1424   {
 1425     pure int fpclassify(float x)     { return __fpclassifyf(x); }
 1426     pure int fpclassify(double x)    { return __fpclassifyd(x); }
 1427     pure int fpclassify(real x)      { return __fpclassifyl(x); }
 1428 
 1429     pure int isfinite(float x)       { return __isfinitef(x); }
 1430     pure int isfinite(double x)      { return __isfinite(x); }
 1431     pure int isfinite(real x)        { return __isfinitel(x); }
 1432 
 1433     pure int isinf(float x)          { return __isinff(x); }
 1434     pure int isinf(double x)         { return __isinf(x); }
 1435     pure int isinf(real x)           { return __isinfl(x); }
 1436 
 1437     pure int isnan(float x)          { return __isnanf(x); }
 1438     pure int isnan(double x)         { return __isnan(x); }
 1439     pure int isnan(real x)           { return __isnanl(x); }
 1440 
 1441     pure int isnormal(float x)       { return __isnormalf(x); }
 1442     pure int isnormal(double x)      { return __isnormal(x); }
 1443     pure int isnormal(real x)        { return __isnormall(x); }
 1444 
 1445     pure int signbit(float x)        { return __signbitf(x); }
 1446     pure int signbit(double x)       { return __signbit(x); }
 1447     pure int signbit(real x)         { return __signbitl(x); }
 1448   }
 1449 }
 1450 else version (Solaris)
 1451 {
 1452     pure int __isnanf(float x);
 1453     pure int __isnan(double x);
 1454     pure int __isnanl(real x);
 1455 
 1456   extern (D)
 1457   {
 1458     //int isnan(real-floating x);
 1459       ///
 1460     pure int isnan(float x)          { return __isnanf(x);  }
 1461     ///
 1462     pure int isnan(double x)         { return __isnan(x);   }
 1463     ///
 1464     pure int isnan(real x)
 1465     {
 1466         return (real.sizeof == double.sizeof)
 1467             ? __isnan(x)
 1468             : __isnanl(x);
 1469     }
 1470   }
 1471 }
 1472 else version (CRuntime_Bionic)
 1473 {
 1474     enum
 1475     {
 1476         ///
 1477         FP_INFINITE  = 0x01,
 1478         ///
 1479         FP_NAN       = 0x02,
 1480         ///
 1481         FP_NORMAL    = 0x04,
 1482         ///
 1483         FP_SUBNORMAL = 0x08,
 1484         ///
 1485         FP_ZERO      = 0x10,
 1486     }
 1487 
 1488     ///
 1489     enum FP_FAST_FMAF;
 1490 
 1491     pure int __fpclassifyd(double);
 1492     pure int __fpclassifyf(float);
 1493     pure int __fpclassifyl(real);
 1494 
 1495     pure int __isfinitef(float);
 1496     pure int __isfinite(double);
 1497     pure int __isfinitel(real);
 1498 
 1499     pure int __isinff(float);
 1500     pure int __isinf(double);
 1501     pure int __isinfl(real);
 1502 
 1503     pure int isnanf(float);
 1504     pure int isnan(double);
 1505     pure int __isnanl(real);
 1506 
 1507     pure int __isnormalf(float);
 1508     pure int __isnormal(double);
 1509     pure int __isnormall(real);
 1510 
 1511     pure int __signbit(double);
 1512     pure int __signbitf(float);
 1513     pure int __signbitl(real);
 1514 
 1515   extern (D)
 1516   {
 1517     //int fpclassify(real-floating x);
 1518       ///
 1519     pure int fpclassify(float x)     { return __fpclassifyf(x); }
 1520     ///
 1521     pure int fpclassify(double x)    { return __fpclassifyd(x); }
 1522     ///
 1523     pure int fpclassify(real x)      { return __fpclassifyl(x); }
 1524 
 1525     //int isfinite(real-floating x);
 1526     ///
 1527     pure int isfinite(float x)       { return __isfinitef(x); }
 1528     ///
 1529     pure int isfinite(double x)      { return __isfinite(x); }
 1530     ///
 1531     pure int isfinite(real x)        { return __isfinitel(x); }
 1532 
 1533     //int isinf(real-floating x);
 1534     ///
 1535     pure int isinf(float x)          { return __isinff(x); }
 1536     ///
 1537     pure int isinf(double x)         { return __isinf(x); }
 1538     ///
 1539     pure int isinf(real x)           { return __isinfl(x); }
 1540 
 1541     //int isnan(real-floating x);
 1542     ///
 1543     pure int isnan(float x)          { return isnanf(x); }
 1544     ///
 1545     pure int isnan(real x)           { return __isnanl(x); }
 1546 
 1547     //int isnormal(real-floating x);
 1548     ///
 1549     pure int isnormal(float x)       { return __isnormalf(x); }
 1550     ///
 1551     pure int isnormal(double x)      { return __isnormal(x); }
 1552     ///
 1553     pure int isnormal(real x)        { return __isnormall(x); }
 1554 
 1555     //int signbit(real-floating x);
 1556     ///
 1557     pure int signbit(float x)        { return __signbitf(x); }
 1558     ///
 1559     pure int signbit(double x)       { return __signbit(x); }
 1560     ///
 1561     pure int signbit(real x)         { return __signbitl(x); }
 1562   }
 1563 }
 1564 
 1565 extern (D)
 1566 {
 1567     //int isgreater(real-floating x, real-floating y);
 1568     ///
 1569     pure int isgreater(float x, float y)        { return x > y && !isunordered(x, y); }
 1570     ///
 1571     pure int isgreater(double x, double y)      { return x > y && !isunordered(x, y); }
 1572     ///
 1573     pure int isgreater(real x, real y)          { return x > y && !isunordered(x, y); }
 1574 
 1575     //int isgreaterequal(real-floating x, real-floating y);
 1576     ///
 1577     pure int isgreaterequal(float x, float y)   { return x >= y && !isunordered(x, y); }
 1578     ///
 1579     pure int isgreaterequal(double x, double y) { return x >= y && !isunordered(x, y); }
 1580     ///
 1581     pure int isgreaterequal(real x, real y)     { return x >= y && !isunordered(x, y); }
 1582 
 1583     //int isless(real-floating x, real-floating y);
 1584     ///
 1585     pure int isless(float x, float y)           { return x < y && !isunordered(x, y); }
 1586     ///
 1587     pure int isless(double x, double y)         { return x < y && !isunordered(x, y); }
 1588     ///
 1589     pure int isless(real x, real y)             { return x < y && !isunordered(x, y); }
 1590 
 1591     //int islessequal(real-floating x, real-floating y);
 1592     ///
 1593     pure int islessequal(float x, float y)      { return x <= y && !isunordered(x, y); }
 1594     ///
 1595     pure int islessequal(double x, double y)    { return x <= y && !isunordered(x, y); }
 1596     ///
 1597     pure int islessequal(real x, real y)        { return x <= y && !isunordered(x, y); }
 1598 
 1599     //int islessgreater(real-floating x, real-floating y);
 1600     ///
 1601     pure int islessgreater(float x, float y)    { return x != y && !isunordered(x, y); }
 1602     ///
 1603     pure int islessgreater(double x, double y)  { return x != y && !isunordered(x, y); }
 1604     ///
 1605     pure int islessgreater(real x, real y)      { return x != y && !isunordered(x, y); }
 1606 
 1607     //int isunordered(real-floating x, real-floating y);
 1608     ///
 1609     pure int isunordered(float x, float y)      { return isnan(x) || isnan(y); }
 1610     ///
 1611     pure int isunordered(double x, double y)    { return isnan(x) || isnan(y); }
 1612     ///
 1613     pure int isunordered(real x, real y)        { return isnan(x) || isnan(y); }
 1614 }
 1615 
 1616 /* MS define some functions inline.
 1617  * Additionally, their *l functions work with a 64-bit long double and are thus
 1618  * useless for 80-bit D reals. So we use our own wrapper implementations working
 1619  * internally with reduced 64-bit precision.
 1620  * This also enables relaxing real to 64-bit double.
 1621  */
 1622 version (CRuntime_Microsoft) // fully supported since MSVCRT 12 (VS 2013) only
 1623 {
 1624     ///
 1625     double  acos(double x);
 1626     ///
 1627     float   acosf(float x);
 1628     ///
 1629     extern(D) real acosl()(real x)   { return acos(cast(double) x); }
 1630 
 1631     ///
 1632     double  asin(double x);
 1633     ///
 1634     float   asinf(float x);
 1635     ///
 1636     extern(D) real asinl()(real x)   { return asin(cast(double) x); }
 1637 
 1638     ///
 1639     pure double  atan(double x);
 1640     ///
 1641     pure float   atanf(float x);
 1642     ///
 1643     pure extern(D) real atanl()(real x)   { return atan(cast(double) x); }
 1644 
 1645     ///
 1646     double  atan2(double y, double x);
 1647     ///
 1648     float   atan2f(float y, float x);
 1649     ///
 1650     extern(D) real atan2l()(real y, real x) { return atan2(cast(double) y, cast(double) x); }
 1651 
 1652     ///
 1653     pure double  cos(double x);
 1654     ///
 1655     pure float   cosf(float x);
 1656     ///
 1657     extern(D) pure real cosl()(real x)    { return cos(cast(double) x); }
 1658 
 1659     ///
 1660     pure double  sin(double x);
 1661     ///
 1662     pure float   sinf(float x);
 1663     ///
 1664     extern(D) pure real sinl()(real x)    { return sin(cast(double) x); }
 1665 
 1666     ///
 1667     pure double  tan(double x);
 1668     ///
 1669     pure float   tanf(float x);
 1670     ///
 1671     extern(D) pure real tanl()(real x)    { return tan(cast(double) x); }
 1672 
 1673     ///
 1674     double  acosh(double x);
 1675     ///
 1676     float   acoshf(float x);
 1677     ///
 1678     extern(D) real acoshl()(real x)  { return acosh(cast(double) x); }
 1679 
 1680     ///
 1681     pure double  asinh(double x);
 1682     ///
 1683     pure float   asinhf(float x);
 1684     ///
 1685     pure extern(D) real asinhl()(real x)  { return asinh(cast(double) x); }
 1686 
 1687     ///
 1688     double  atanh(double x);
 1689     ///
 1690     float   atanhf(float x);
 1691     ///
 1692     extern(D) real atanhl()(real x)  { return atanh(cast(double) x); }
 1693 
 1694     ///
 1695     double  cosh(double x);
 1696     ///
 1697     float   coshf(float x);
 1698     ///
 1699     extern(D) real coshl()(real x)   { return cosh(cast(double) x); }
 1700 
 1701     ///
 1702     double  sinh(double x);
 1703     ///
 1704     float   sinhf(float x);
 1705     ///
 1706     extern(D) real sinhl()(real x)   { return sinh(cast(double) x); }
 1707 
 1708     ///
 1709     pure double  tanh(double x);
 1710     ///
 1711     pure float   tanhf(float x);
 1712     ///
 1713     extern(D) pure real tanhl()(real x)   { return tanh(cast(double) x); }
 1714 
 1715     ///
 1716     double  exp(double x);
 1717     ///
 1718     float   expf(float x);
 1719     ///
 1720     extern(D) real expl()(real x)    { return exp(cast(double) x); }
 1721 
 1722     ///
 1723     double  exp2(double x);
 1724     ///
 1725     float   exp2f(float x);
 1726     ///
 1727     extern(D) real exp2l()(real x)   { return exp2(cast(double) x); }
 1728 
 1729     ///
 1730     double  expm1(double x);
 1731     ///
 1732     float   expm1f(float x);
 1733     ///
 1734     extern(D) real expm1l()(real x)  { return expm1(cast(double) x); }
 1735 
 1736     ///
 1737     pure double  frexp(double value, int* exp);
 1738     ///
 1739     extern(D) pure float frexpf()(float value, int* exp) { return cast(float) frexp(value, exp); }
 1740     ///
 1741     extern(D) pure real  frexpl()(real value, int* exp)  { return frexp(cast(double) value, exp); }
 1742 
 1743     ///
 1744     int     ilogb(double x);
 1745     ///
 1746     int     ilogbf(float x);
 1747     ///
 1748     extern(D) int ilogbl()(real x)   { return ilogb(cast(double) x); }
 1749 
 1750     ///
 1751     double  ldexp(double x, int exp);
 1752     ///
 1753     extern(D) float ldexpf()(float x, int exp) { return cast(float) ldexp(x, exp); }
 1754     ///
 1755     extern(D) real  ldexpl()(real x, int exp)  { return ldexp(cast(double) x, exp); }
 1756 
 1757     ///
 1758     double  log(double x);
 1759     ///
 1760     float   logf(float x);
 1761     ///
 1762     extern(D) real logl()(real x)    { return log(cast(double) x); }
 1763 
 1764     ///
 1765     double  log10(double x);
 1766     ///
 1767     float   log10f(float x);
 1768     ///
 1769     extern(D) real log10l()(real x)  { return log10(cast(double) x); }
 1770 
 1771     ///
 1772     double  log1p(double x);
 1773     ///
 1774     float   log1pf(float x);
 1775     ///
 1776     extern(D) real log1pl()(real x)  { return log1p(cast(double) x); }
 1777 
 1778     ///
 1779     double  log2(double x);
 1780     ///
 1781     float   log2f(float x);
 1782     ///
 1783     extern(D) real log2l()(real x)   { return log2(cast(double) x); }
 1784 
 1785     ///
 1786     double  logb(double x);
 1787     ///
 1788     float   logbf(float x);
 1789     ///
 1790     extern(D) real logbl()(real x)   { return logb(cast(double) x); }
 1791 
 1792     ///
 1793     pure double  modf(double value, double* iptr);
 1794     ///
 1795     pure float   modff(float value, float* iptr);
 1796     ///
 1797     extern(D) pure real modfl()(real value, real* iptr)
 1798     {
 1799         double i;
 1800         double r = modf(cast(double) value, &i);
 1801         *iptr = i;
 1802         return r;
 1803     }
 1804 
 1805     ///
 1806     double  scalbn(double x, int n);
 1807     ///
 1808     float   scalbnf(float x, int n);
 1809     ///
 1810     extern(D) real scalbnl()(real x, int n) { return scalbn(cast(double) x, n); }
 1811 
 1812     ///
 1813     double  scalbln(double x, c_long n);
 1814     ///
 1815     float   scalblnf(float x, c_long n);
 1816     ///
 1817     extern(D) real scalblnl()(real x, c_long n) { return scalbln(cast(double) x, n); }
 1818 
 1819     ///
 1820     pure double  cbrt(double x);
 1821     ///
 1822     pure float   cbrtf(float x);
 1823     ///
 1824     extern(D) pure real cbrtl()(real x)   { return cbrt(cast(double) x); }
 1825 
 1826     ///
 1827     pure double  fabs(double x);
 1828     ///
 1829     extern(D) pure float fabsf()(float x) { return cast(float) fabs(x); }
 1830     ///
 1831     extern(D) pure real  fabsl()(real x)  { return fabs(cast(double) x); }
 1832 
 1833     private double _hypot(double x, double y);
 1834     private float  _hypotf(float x, float y);
 1835     ///
 1836     extern(D) double hypot(double x, double y) { return _hypot(x, y); }
 1837     ///
 1838     extern(D) float  hypotf(float x, float y)  { return _hypotf(x, y); }
 1839     ///
 1840     extern(D) real   hypotl(real x, real y)    { return _hypot(cast(double) x, cast(double) y); }
 1841 
 1842     ///
 1843     double  pow(double x, double y);
 1844     ///
 1845     float   powf(float x, float y);
 1846     ///
 1847     extern(D) real powl()(real x, real y) { return pow(cast(double) x, cast(double) y); }
 1848 
 1849     ///
 1850     double  sqrt(double x);
 1851     ///
 1852     float   sqrtf(float x);
 1853     ///
 1854     extern(D) real sqrtl()(real x)   { return sqrt(cast(double) x); }
 1855 
 1856     ///
 1857     pure double  erf(double x);
 1858     ///
 1859     pure float   erff(float x);
 1860     ///
 1861     extern(D) pure real erfl()(real x)    { return erf(cast(double) x); }
 1862 
 1863     ///
 1864     double  erfc(double x);
 1865     ///
 1866     float   erfcf(float x);
 1867     ///
 1868     extern(D) real erfcl()(real x)   { return erfc(cast(double) x); }
 1869 
 1870     ///
 1871     double  lgamma(double x);
 1872     ///
 1873     float   lgammaf(float x);
 1874     ///
 1875     extern(D) real lgammal()(real x) { return lgamma(cast(double) x); }
 1876 
 1877     ///
 1878     double  tgamma(double x);
 1879     ///
 1880     float   tgammaf(float x);
 1881     ///
 1882     extern(D) real tgammal()(real x) { return tgamma(cast(double) x); }
 1883 
 1884     ///
 1885     pure double  ceil(double x);
 1886     ///
 1887     pure float   ceilf(float x);
 1888     ///
 1889     extern(D) pure real ceill()(real x)   { return ceil(cast(double) x); }
 1890 
 1891     ///
 1892     pure double  floor(double x);
 1893     ///
 1894     pure float   floorf(float x);
 1895     ///
 1896     extern(D) pure real floorl()(real x)  { return floor(cast(double) x); }
 1897 
 1898     ///
 1899     pure double  nearbyint(double x);
 1900     ///
 1901     pure float   nearbyintf(float x);
 1902     ///
 1903     extern(D) pure real nearbyintl()(real x) { return nearbyint(cast(double) x); }
 1904 
 1905     ///
 1906     pure double  rint(double x);
 1907     ///
 1908     pure float   rintf(float x);
 1909     ///
 1910     extern(D) pure real rintl()(real x)   { return rint(cast(double) x); }
 1911 
 1912     ///
 1913     c_long  lrint(double x);
 1914     ///
 1915     c_long  lrintf(float x);
 1916     ///
 1917     extern(D) c_long lrintl()(real x) { return lrint(cast(double) x); }
 1918 
 1919     ///
 1920     long    llrint(double x);
 1921     ///
 1922     long    llrintf(float x);
 1923     ///
 1924     extern(D) long llrintl()(real x) { return llrint(cast(double) x); }
 1925 
 1926     ///
 1927     pure double  round(double x);
 1928     ///
 1929     pure float   roundf(float x);
 1930     ///
 1931     extern(D) pure real roundl()(real x)  { return round(cast(double) x); }
 1932 
 1933     ///
 1934     c_long  lround(double x);
 1935     ///
 1936     c_long  lroundf(float x);
 1937     ///
 1938     extern(D) c_long lroundl()(real x) { return lround(cast(double) x); }
 1939 
 1940     ///
 1941     long    llround(double x);
 1942     ///
 1943     long    llroundf(float x);
 1944     ///
 1945     extern(D) long llroundl()(real x) { return llround(cast(double) x); }
 1946 
 1947     ///
 1948     pure double  trunc(double x);
 1949     ///
 1950     pure float   truncf(float x);
 1951     ///
 1952     extern(D) pure real truncl()(real x)  { return trunc(cast(double) x); }
 1953 
 1954     ///
 1955     double  fmod(double x, double y);
 1956     ///
 1957     float   fmodf(float x, float y);
 1958     ///
 1959     extern(D) real fmodl()(real x, real y) { return fmod(cast(double) x, cast(double) y); }
 1960 
 1961     ///
 1962     double  remainder(double x, double y);
 1963     ///
 1964     float   remainderf(float x, float y);
 1965     ///
 1966     extern(D) real remainderl()(real x, real y) { return remainder(cast(double) x, cast(double) y); }
 1967 
 1968     ///
 1969     double  remquo(double x, double y, int* quo);
 1970     ///
 1971     float   remquof(float x, float y, int* quo);
 1972     ///
 1973     extern(D) real remquol()(real x, real y, int* quo) { return remquo(cast(double) x, cast(double) y, quo); }
 1974 
 1975     ///
 1976     pure double  copysign(double x, double y);
 1977     ///
 1978     pure float   copysignf(float x, float y);
 1979     ///
 1980     extern(D) pure real copysignl()(real x, real y) { return copysign(cast(double) x, cast(double) y); }
 1981 
 1982     ///
 1983     pure double  nan(char* tagp);
 1984     ///
 1985     pure float   nanf(char* tagp);
 1986     ///
 1987     extern(D) pure real nanl()(char* tagp) { return nan(tagp); }
 1988 
 1989     ///
 1990     double  nextafter(double x, double y);
 1991     ///
 1992     float   nextafterf(float x, float y);
 1993     ///
 1994     extern(D) real nextafterl()(real x, real y) { return nextafter(cast(double) x, cast(double) y); }
 1995 
 1996     ///
 1997     double  nexttoward(double x, real y);
 1998     ///
 1999     float   nexttowardf(float x, real y);
 2000     ///
 2001     extern(D) real nexttowardl()(real x, real y) { return nexttoward(cast(double) x, cast(double) y); }
 2002 
 2003     ///
 2004     double  fdim(double x, double y);
 2005     ///
 2006     float   fdimf(float x, float y);
 2007     ///
 2008     extern(D) real fdiml()(real x, real y) { return fdim(cast(double) x, cast(double) y); }
 2009 
 2010     ///
 2011     pure double  fmax(double x, double y);
 2012     ///
 2013     pure float   fmaxf(float x, float y);
 2014     ///
 2015     extern(D) pure real fmaxl()(real x, real y) { return fmax(cast(double) x, cast(double) y); }
 2016 
 2017     ///
 2018     pure double  fmin(double x, double y);
 2019     ///
 2020     pure float   fminf(float x, float y);
 2021     ///
 2022     extern(D) pure real fminl()(real x, real y) { return fmin(cast(double) x, cast(double) y); }
 2023 
 2024     ///
 2025     pure double  fma(double x, double y, double z);
 2026     ///
 2027     pure float   fmaf(float x, float y, float z);
 2028     ///
 2029     extern(D) pure real fmal()(real x, real y, real z) { return fma(cast(double) x, cast(double) y, cast(double) z); }
 2030 }
 2031 else version (FreeBSD)
 2032 {
 2033     ///
 2034     double  acos(double x);
 2035     ///
 2036     float   acosf(float x);
 2037     ///
 2038     real    acosl(real x); // since 8.0
 2039 
 2040     ///
 2041     double  asin(double x);
 2042     ///
 2043     float   asinf(float x);
 2044     ///
 2045     real    asinl(real x); // since 8.0
 2046 
 2047     ///
 2048     pure double  atan(double x);
 2049     ///
 2050     pure float   atanf(float x);
 2051     ///
 2052     pure real    atanl(real x); // since 8.0
 2053 
 2054     ///
 2055     double  atan2(double y, double x);
 2056     ///
 2057     float   atan2f(float y, float x);
 2058     ///
 2059     real    atan2l(real y, real x); // since 8.0
 2060 
 2061     ///
 2062     pure double  cos(double x);
 2063     ///
 2064     pure float   cosf(float x);
 2065     ///
 2066     pure real    cosl(real x); // since 8.0
 2067 
 2068     ///
 2069     pure double  sin(double x);
 2070     ///
 2071     pure float   sinf(float x);
 2072     ///
 2073     pure real    sinl(real x); // since 8.0
 2074 
 2075     ///
 2076     pure double  tan(double x);
 2077     ///
 2078     pure float   tanf(float x);
 2079     ///
 2080     pure real    tanl(real x); // since 8.0
 2081 
 2082     ///
 2083     double  acosh(double x);
 2084     ///
 2085     float   acoshf(float x);
 2086     ///
 2087     real    acoshl(real x); // since 10.0
 2088 
 2089     ///
 2090     pure double  asinh(double x);
 2091     ///
 2092     pure float   asinhf(float x);
 2093     ///
 2094     pure real    asinhl(real x); // since 10.0
 2095 
 2096     ///
 2097     double  atanh(double x);
 2098     ///
 2099     float   atanhf(float x);
 2100     ///
 2101     real    atanhl(real x); // since 10.0
 2102 
 2103     ///
 2104     double  cosh(double x);
 2105     ///
 2106     float   coshf(float x);
 2107     ///
 2108     real    coshl(real x); // since 10.1
 2109 
 2110     ///
 2111     double  sinh(double x);
 2112     ///
 2113     float   sinhf(float x);
 2114     ///
 2115     real    sinhl(real x); // since 10.1
 2116 
 2117     ///
 2118     pure double  tanh(double x);
 2119     ///
 2120     pure float   tanhf(float x);
 2121     ///
 2122     pure real    tanhl(real x); // since 10.1
 2123 
 2124     ///
 2125     double  exp(double x);
 2126     ///
 2127     float   expf(float x);
 2128     ///
 2129     real    expl(real x); // since 10.0
 2130 
 2131     ///
 2132     double  exp2(double x);
 2133     ///
 2134     float   exp2f(float x);
 2135     ///
 2136     real    exp2l(real x); // since 8.0
 2137 
 2138     ///
 2139     double  expm1(double x);
 2140     ///
 2141     float   expm1f(float x);
 2142     ///
 2143     real    expm1l(real x); // since 10.0
 2144 
 2145     ///
 2146     pure double  frexp(double value, int* exp);
 2147     ///
 2148     pure float   frexpf(float value, int* exp);
 2149     ///
 2150     pure real    frexpl(real value, int* exp); // since 6.0
 2151 
 2152     ///
 2153     int     ilogb(double x);
 2154     ///
 2155     int     ilogbf(float x);
 2156     ///
 2157     int     ilogbl(real x); // since 5.4
 2158 
 2159     ///
 2160     double  ldexp(double x, int exp);
 2161     ///
 2162     float   ldexpf(float x, int exp);
 2163     ///
 2164     real    ldexpl(real x, int exp); // since 6.0
 2165 
 2166     ///
 2167     double  log(double x);
 2168     ///
 2169     float   logf(float x);
 2170     ///
 2171     real    logl(real x); // since 10.0
 2172 
 2173     ///
 2174     double  log10(double x);
 2175     ///
 2176     float   log10f(float x);
 2177     ///
 2178     real    log10l(real x); // since 10.0
 2179 
 2180     ///
 2181     double  log1p(double x);
 2182     ///
 2183     float   log1pf(float x);
 2184     ///
 2185     real    log1pl(real x); // since 10.0
 2186 
 2187     ///
 2188     double log2(double x); // since 8.3
 2189     ///
 2190     float  log2f(float x); // since 8.3
 2191     ///
 2192     real   log2l(real x); // since 10.0
 2193 
 2194     ///
 2195     double  logb(double x);
 2196     ///
 2197     float   logbf(float x);
 2198     ///
 2199     real    logbl(real x); // since 8.0
 2200 
 2201     ///
 2202     pure double  modf(double value, double* iptr);
 2203     ///
 2204     pure float   modff(float value, float* iptr);
 2205     ///
 2206     pure real    modfl(real value, real *iptr); // since 8.0
 2207 
 2208     ///
 2209     double  scalbn(double x, int n);
 2210     ///
 2211     float   scalbnf(float x, int n);
 2212     ///
 2213     real    scalbnl(real x, int n); // since 6.0
 2214 
 2215     ///
 2216     double  scalbln(double x, c_long n);
 2217     ///
 2218     float   scalblnf(float x, c_long n);
 2219     ///
 2220     real    scalblnl(real x, c_long n); // since 6.0
 2221 
 2222     ///
 2223     pure double  cbrt(double x);
 2224     ///
 2225     pure float   cbrtf(float x);
 2226     ///
 2227     pure real    cbrtl(real x); // since 9.0
 2228 
 2229     ///
 2230     pure double  fabs(double x);
 2231     ///
 2232     pure float   fabsf(float x);
 2233     ///
 2234     pure real    fabsl(real x); // since 5.3
 2235 
 2236     ///
 2237     double  hypot(double x, double y);
 2238     ///
 2239     float   hypotf(float x, float y);
 2240     ///
 2241     real    hypotl(real x, real y); // since 8.0
 2242 
 2243     ///
 2244     double  pow(double x, double y);
 2245     ///
 2246     float   powf(float x, float y);
 2247     ///
 2248     real    powl(real x, real y); // since 10.4
 2249 
 2250     ///
 2251     double  sqrt(double x);
 2252     ///
 2253     float   sqrtf(float x);
 2254     ///
 2255     real    sqrtl(real x); // since 8.0
 2256 
 2257     ///
 2258     pure double  erf(double x);
 2259     ///
 2260     pure float   erff(float x);
 2261     ///
 2262     pure real    erfl(real x); // since 10.1
 2263 
 2264     ///
 2265     double  erfc(double x);
 2266     ///
 2267     float   erfcf(float x);
 2268     ///
 2269     real    erfcl(real x); // since 10.1
 2270 
 2271     ///
 2272     double  lgamma(double x);
 2273     ///
 2274     float   lgammaf(float x);
 2275     ///
 2276     real    lgammal(real x); // since 10.2
 2277 
 2278     ///
 2279     double  tgamma(double x);
 2280     ///
 2281     float   tgammaf(float x);
 2282     ///
 2283     real    tgammal(real x); // since 11.2
 2284 
 2285     ///
 2286     pure double  ceil(double x);
 2287     ///
 2288     pure float   ceilf(float x);
 2289     ///
 2290     pure real    ceill(real x); // since 5.4
 2291 
 2292     ///
 2293     pure double  floor(double x);
 2294     ///
 2295     pure float   floorf(float x);
 2296     ///
 2297     pure real    floorl(real x); // since 5.4
 2298 
 2299     ///
 2300     pure double  nearbyint(double x);
 2301     ///
 2302     pure float   nearbyintf(float x);
 2303     ///
 2304     pure real    nearbyintl(real x); // since 8.0
 2305 
 2306     ///
 2307     pure double  rint(double x);
 2308     ///
 2309     pure float   rintf(float x);
 2310     ///
 2311     pure real    rintl(real x); // since 8.0
 2312 
 2313     ///
 2314     c_long  lrint(double x);
 2315     ///
 2316     c_long  lrintf(float x);
 2317     ///
 2318     c_long  lrintl(real x); // since 8.0
 2319 
 2320     ///
 2321     long    llrint(double x);
 2322     ///
 2323     long    llrintf(float x);
 2324     ///
 2325     long    llrintl(real x); // since 8.0
 2326 
 2327     ///
 2328     pure double  round(double x);
 2329     ///
 2330     pure float   roundf(float x);
 2331     ///
 2332     pure real    roundl(real x); // since 6.0
 2333 
 2334     ///
 2335     c_long  lround(double x);
 2336     ///
 2337     c_long  lroundf(float x);
 2338     ///
 2339     c_long  lroundl(real x); // since 6.0
 2340 
 2341     ///
 2342     long    llround(double x);
 2343     ///
 2344     long    llroundf(float x);
 2345     ///
 2346     long    llroundl(real x); // since 6.0
 2347 
 2348     ///
 2349     pure double  trunc(double x);
 2350     ///
 2351     pure float   truncf(float x);
 2352     ///
 2353     pure real    truncl(real x); // since 6.0
 2354 
 2355     ///
 2356     double  fmod(double x, double y);
 2357     ///
 2358     float   fmodf(float x, float y);
 2359     ///
 2360     real    fmodl(real x, real y); // since 8.0
 2361 
 2362     ///
 2363     double  remainder(double x, double y);
 2364     ///
 2365     float   remainderf(float x, float y);
 2366     ///
 2367     real    remainderl(real x, real y); // since 8.0
 2368 
 2369     ///
 2370     double  remquo(double x, double y, int* quo);
 2371     ///
 2372     float   remquof(float x, float y, int* quo);
 2373     ///
 2374     real    remquol(real x, real y, int* quo); // since 8.0
 2375 
 2376     ///
 2377     pure double  copysign(double x, double y);
 2378     ///
 2379     pure float   copysignf(float x, float y);
 2380     ///
 2381     pure real    copysignl(real x, real y); // since 5.3
 2382 
 2383     ///
 2384     pure double  nan(const char*); // since 8.0
 2385     ///
 2386     pure float   nanf(const char*); // since 8.0
 2387     ///
 2388     pure real    nanl(const char*); // since 8.0
 2389 
 2390     ///
 2391     double  nextafter(double x, double y);
 2392     ///
 2393     float   nextafterf(float x, float y);
 2394     ///
 2395     real    nextafterl(real x, real y); // since 6.0
 2396 
 2397     ///
 2398     double  nexttoward(double x, real y);
 2399     ///
 2400     float   nexttowardf(float x, real y);
 2401     ///
 2402     real    nexttowardl(real x, real y); // since 6.0
 2403 
 2404     ///
 2405     double  fdim(double x, double y);
 2406     ///
 2407     float   fdimf(float x, float y);
 2408     ///
 2409     real    fdiml(real x, real y); // since 5.3
 2410 
 2411     ///
 2412     pure double  fmax(double x, double y);
 2413     ///
 2414     pure float   fmaxf(float x, float y);
 2415     ///
 2416     pure real    fmaxl(real x, real y); // since 5.3
 2417 
 2418     ///
 2419     pure double  fmin(double x, double y);
 2420     ///
 2421     pure float   fminf(float x, float y);
 2422     ///
 2423     pure real    fminl(real x, real y); // since 5.3
 2424 
 2425     ///
 2426     pure double  fma(double x, double y, double z);
 2427     ///
 2428     pure float   fmaf(float x, float y, float z);
 2429     ///
 2430     pure real    fmal(real x, real y, real z); // since 6.0
 2431 }
 2432 else version (NetBSD)
 2433 {
 2434 
 2435     ///
 2436     real    acosl(real x);
 2437     ///
 2438     real    asinl(real x);
 2439     ///
 2440     pure real    atanl(real x);
 2441     ///
 2442     real    atan2l(real y, real x);
 2443     ///
 2444     pure real    cosl(real x);
 2445     ///
 2446     pure real    sinl(real x);
 2447     ///
 2448     pure real    tanl(real x);
 2449     ///
 2450     real    exp2l(real x);
 2451     ///
 2452     pure real    frexpl(real value, int* exp);
 2453     ///
 2454     int     ilogbl(real x);
 2455     ///
 2456     real    ldexpl(real x, int exp);
 2457     ///
 2458     real    logbl(real x);
 2459     ///
 2460     pure real    modfl(real value, real *iptr);
 2461     ///
 2462     real    scalbnl(real x, int n);
 2463     ///
 2464     real    scalblnl(real x, c_long n);
 2465     ///
 2466     pure real    fabsl(real x);
 2467     ///
 2468     real    hypotl(real x, real y);
 2469     ///
 2470     real    sqrtl(real x);
 2471     ///
 2472     pure real    ceill(real x);
 2473     ///
 2474     pure real    floorl(real x);
 2475     ///
 2476     pure real    nearbyintl(real x);
 2477     ///
 2478     pure real    rintl(real x);
 2479     ///
 2480     extern(D) c_long lrintl(real x) { return cast(c_long)rintl(x); }
 2481     ///
 2482     pure real    roundl(real x);
 2483     ///
 2484     extern(D) c_long lroundl(real x) { return cast(c_long)roundl(x);}
 2485     ///
 2486     extern(D) long llroundl(real x) { return cast(long)roundl(x);}
 2487     ///
 2488     pure real    truncl(real x);
 2489     ///
 2490     real    fmodl(real x, real y);
 2491     ///
 2492     real    remainderl(real x, real y)  { return remainder(x,y); }
 2493     ///
 2494     real    remquol(real x, real y, int* quo){ return remquo(x,y,quo); }
 2495     ///
 2496     pure real    copysignl(real x, real y);
 2497     ///
 2498     pure double  nan(char* tagp);
 2499     ///
 2500     pure float   nanf(char* tagp);
 2501     ///
 2502     pure real    nanl(char* tagp);
 2503     ///
 2504     real    nextafterl(real x, real y);
 2505     ///
 2506     extern(D) real nexttowardl(real x, real y) { return nexttoward(cast(double) x, cast(double) y); }
 2507     ///
 2508     real    fdiml(real x, real y);
 2509     ///
 2510     pure real    fmaxl(real x, real y);
 2511     ///
 2512     pure real    fminl(real x, real y);
 2513     ///
 2514     pure real    fmal(real x, real y, real z);
 2515 
 2516     ///
 2517     double  acos(double x);
 2518     ///
 2519     float   acosf(float x);
 2520 
 2521     ///
 2522     double  asin(double x);
 2523     ///
 2524     float   asinf(float x);
 2525 
 2526     ///
 2527     pure double  atan(double x);
 2528     ///
 2529     pure float   atanf(float x);
 2530 
 2531     ///
 2532     double  atan2(double y, double x);
 2533     ///
 2534     float   atan2f(float y, float x);
 2535 
 2536     ///
 2537     pure double  cos(double x);
 2538     ///
 2539     pure float   cosf(float x);
 2540 
 2541     ///
 2542     pure double  sin(double x);
 2543     ///
 2544     pure float   sinf(float x);
 2545 
 2546     ///
 2547     pure double  tan(double x);
 2548     ///
 2549     pure float   tanf(float x);
 2550 
 2551     ///
 2552     double  acosh(double x);
 2553     ///
 2554     float   acoshf(float x);
 2555     ///
 2556     real    acoshl(real x);
 2557 
 2558     ///
 2559     pure double  asinh(double x);
 2560     ///
 2561     pure float   asinhf(float x);
 2562     ///
 2563     pure real    asinhl(real x);
 2564 
 2565     ///
 2566     double  atanh(double x);
 2567     ///
 2568     float   atanhf(float x);
 2569     ///
 2570     real    atanhl(real x);
 2571 
 2572     ///
 2573     double  cosh(double x);
 2574     ///
 2575     float   coshf(float x);
 2576     ///
 2577     real    coshl(real x);
 2578 
 2579     ///
 2580     double  sinh(double x);
 2581     ///
 2582     float   sinhf(float x);
 2583     ///
 2584     real    sinhl(real x);
 2585 
 2586     ///
 2587     pure double  tanh(double x);
 2588     ///
 2589     pure float   tanhf(float x);
 2590     ///
 2591     pure real    tanhl(real x);
 2592 
 2593     ///
 2594     double  exp(double x);
 2595     ///
 2596     float   expf(float x);
 2597     ///
 2598     real    expl(real x);
 2599 
 2600     ///
 2601     double  exp2(double x);
 2602     ///
 2603     float   exp2f(float x);
 2604 
 2605     ///
 2606     double  expm1(double x);
 2607     ///
 2608     float   expm1f(float x);
 2609     ///
 2610     real    expm1l(real x)  { return expm1(cast(double) x); }
 2611 
 2612     ///
 2613     pure double  frexp(double value, int* exp);
 2614     ///
 2615     pure float   frexpf(float value, int* exp);
 2616 
 2617     ///
 2618     int     ilogb(double x);
 2619     ///
 2620     int     ilogbf(float x);
 2621 
 2622     ///
 2623     double  ldexp(double x, int exp);
 2624     ///
 2625     float   ldexpf(float x, int exp);
 2626 
 2627     ///
 2628     double  log(double x);
 2629     ///
 2630     float   logf(float x);
 2631     /// NetBSD has no logl. It is just alias log(double)
 2632     real    logl(real x)
 2633     {
 2634         if (x<0) return real.nan;
 2635         if (x==0) return -real.infinity;
 2636         if (isnan(x) || isinf(x)) return x;
 2637         real rs = 0;
 2638         if (x>double.max)
 2639         {
 2640             immutable MAX = log(double.max);
 2641             for (; x>double.max; x /= double.max)
 2642                 rs += MAX;
 2643         }
 2644         else if (x<double.min_normal)
 2645         {
 2646             immutable MIN = log(double.min_normal);
 2647             for (; x<double.min_normal; x /= double.min_normal)
 2648                 rs += MIN;
 2649         }
 2650         rs += log(x);
 2651         return rs;
 2652     }
 2653 
 2654     ///
 2655     double  log10(double x);
 2656     ///
 2657     float   log10f(float x);
 2658     ///NetBSD has no log10l. It is just alias log(double)
 2659     real    log10l(real x)
 2660     {
 2661         if (x<0) return real.nan;
 2662         if (x==0) return -real.infinity;
 2663         if (isnan(x) || isinf(x)) return x;
 2664 
 2665         real rs = 0;
 2666         if (x>double.max)
 2667         {
 2668             immutable MAX = log10(double.max);
 2669             for (; x>double.max; x /= double.max)
 2670                 rs += MAX;
 2671         }
 2672         else if (x<double.min_normal)
 2673         {
 2674             immutable MIN = log10(double.min_normal);
 2675             for (; x<double.min_normal; x /= double.min_normal)
 2676                 rs += MIN;
 2677         }
 2678         rs += log10(x);
 2679         return rs;
 2680     }
 2681 
 2682 
 2683     ///
 2684     double  log1p(double x);
 2685     ///
 2686     float   log1pf(float x);
 2687     ///
 2688     extern(D) real log1pl(real x) { return log1p(cast(double) x); }
 2689 
 2690     private enum real ONE_LN2 = 1 / 0x1.62e42fefa39ef358p-1L;
 2691     ///
 2692     extern(D) double log2(double x) { return log(x) * ONE_LN2; }
 2693     ///
 2694     extern(D) float log2f(float x) { return logf(x) * ONE_LN2; }
 2695     ///
 2696     real    log2l(real x)  { return logl(x) * ONE_LN2; }
 2697 
 2698     ///
 2699     double  logb(double x);
 2700     ///
 2701     float   logbf(float x);
 2702 
 2703     ///
 2704     pure double  modf(double value, double* iptr);
 2705     ///
 2706     pure float   modff(float value, float* iptr);
 2707 
 2708     ///
 2709     double  scalbn(double x, int n);
 2710     ///
 2711     float   scalbnf(float x, int n);
 2712 
 2713     ///
 2714     double  scalbln(double x, c_long n);
 2715     ///
 2716     float   scalblnf(float x, c_long n);
 2717 
 2718     ///
 2719     pure double  cbrt(double x);
 2720     ///
 2721     pure float   cbrtf(float x);
 2722     ///
 2723     pure real    cbrtl(real x);
 2724 
 2725     ///
 2726     pure double  fabs(double x);
 2727     ///
 2728     pure float   fabsf(float x);
 2729 
 2730     ///
 2731     double  hypot(double x, double y);
 2732     ///
 2733     float   hypotf(float x, float y);
 2734 
 2735     ///
 2736     double  pow(double x, double y);
 2737     ///
 2738     float   powf(float x, float y);
 2739     ///
 2740     real    powl(real x, real y);
 2741 
 2742     ///
 2743     double  sqrt(double x);
 2744     ///
 2745     float   sqrtf(float x);
 2746 
 2747     ///
 2748     pure double  erf(double x);
 2749     ///
 2750     pure float   erff(float x);
 2751     ///
 2752     extern(D) pure real erfl(real x) { return erf(cast(double) x); }
 2753 
 2754     ///
 2755     double  erfc(double x);
 2756     ///
 2757     float   erfcf(float x);
 2758     ///
 2759     real    erfcl(real x)  { return erfc(cast(double) x); }
 2760 
 2761     ///
 2762     double  lgamma(double x);
 2763     ///
 2764     float   lgammaf(float x);
 2765     ///
 2766     real    lgammal(real x){ return lgamma(x); }
 2767 
 2768     ///
 2769     double  tgamma(double x);
 2770     ///
 2771     float   tgammaf(float x);
 2772     ///
 2773     real    tgammal(real x){ return tgamma(cast(double) x); }
 2774 
 2775     ///
 2776     pure double  ceil(double x);
 2777     ///
 2778     pure float   ceilf(float x);
 2779 
 2780     ///
 2781     pure double  floor(double x);
 2782     ///
 2783     pure float   floorf(float x);
 2784 
 2785     ///
 2786     pure double  nearbyint(double x);
 2787     ///
 2788     pure float   nearbyintf(float x);
 2789 
 2790     ///
 2791     pure double  rint(double x);
 2792     ///
 2793     pure float   rintf(float x);
 2794 
 2795     ///
 2796     c_long  lrint(double x);
 2797     ///
 2798     c_long  lrintf(float x);
 2799 
 2800     ///
 2801     long    llrint(double x);
 2802     ///
 2803     long    llrintf(float x);
 2804     ///
 2805     extern(D) long llrintl(real x) { return cast(long)rintl(x); }
 2806 
 2807     ///
 2808     pure double  round(double x);
 2809     ///
 2810     pure float   roundf(float x);
 2811 
 2812     ///
 2813     c_long  lround(double x);
 2814     ///
 2815     c_long  lroundf(float x);
 2816 
 2817     ///
 2818     long    llround(double x);
 2819     ///
 2820     long    llroundf(float x);
 2821 
 2822     ///
 2823     pure double  trunc(double x);
 2824     ///
 2825     pure float   truncf(float x);
 2826 
 2827     ///
 2828     double  fmod(double x, double y);
 2829     ///
 2830     float   fmodf(float x, float y);
 2831 
 2832     ///
 2833     double  remainder(double x, double y);
 2834     ///
 2835     float   remainderf(float x, float y);
 2836 
 2837     ///
 2838     double  remquo(double x, double y, int* quo);
 2839     ///
 2840     float   remquof(float x, float y, int* quo);
 2841 
 2842     ///
 2843     pure double  copysign(double x, double y);
 2844     ///
 2845     pure float   copysignf(float x, float y);
 2846 
 2847     ///
 2848     double  nextafter(double x, double y);
 2849     ///
 2850     float   nextafterf(float x, float y);
 2851 
 2852     ///
 2853     double  nexttoward(double x, real y);
 2854     ///
 2855     float   nexttowardf(float x, real y);
 2856 
 2857     ///
 2858     double  fdim(double x, double y);
 2859     ///
 2860     float   fdimf(float x, float y);
 2861 
 2862     ///
 2863     pure double  fmax(double x, double y);
 2864     ///
 2865     pure float   fmaxf(float x, float y);
 2866 
 2867     ///
 2868     pure double  fmin(double x, double y);
 2869     ///
 2870     pure float   fminf(float x, float y);
 2871 
 2872     ///
 2873     pure double  fma(double x, double y, double z);
 2874     ///
 2875     pure float   fmaf(float x, float y, float z);
 2876 }
 2877 else version (OpenBSD)
 2878 {
 2879     ///
 2880     double acos(double x);
 2881     ///
 2882     double asin(double x);
 2883     ///
 2884     pure double atan(double x);
 2885     ///
 2886     double atan2(double, double);
 2887     ///
 2888     pure double cos(double x);
 2889     ///
 2890     pure double sin(double x);
 2891     ///
 2892     pure double tan(double x);
 2893     ///
 2894     double cosh(double x);
 2895     ///
 2896     double sinh(double x);
 2897     ///
 2898     pure double tanh(double x);
 2899     ///
 2900     double exp(double x);
 2901     ///
 2902     pure double frexp(double, int *exp);
 2903     ///
 2904     double ldexp(double, int exp);
 2905     ///
 2906     double log(double x);
 2907     ///
 2908     double log10(double x);
 2909     ///
 2910     pure double modf(double x, double *iptr);
 2911     ///
 2912     double pow(double x, double y);
 2913     ///
 2914     double sqrt(double x);
 2915     ///
 2916     pure double ceil(double x);
 2917     ///
 2918     pure double fabs(double x);
 2919     ///
 2920     pure double floor(double x);
 2921     ///
 2922     double fmod(double x, double);
 2923     ///
 2924     double acosh(double x);
 2925     ///
 2926     pure double asinh(double x);
 2927     ///
 2928     double atanh(double x);
 2929     ///
 2930     double exp2(double x);
 2931     ///
 2932     double expm1(double x);
 2933     ///
 2934     int ilogb(double x);
 2935     ///
 2936     double log1p(double x);
 2937     ///
 2938     double log2(double x);
 2939     ///
 2940     double logb(double x);
 2941     ///
 2942     double scalbn(double x, int n);
 2943     ///
 2944     double scalbln(double x, c_long n);
 2945     ///
 2946     pure double cbrt(double x);
 2947     ///
 2948     double hypot(double x, double y);
 2949     ///
 2950     pure double erf(double x);
 2951     ///
 2952     double erfc(double x);
 2953     ///
 2954     double lgamma(double x);
 2955     ///
 2956     double tgamma(double x);
 2957     ///
 2958     pure double nearbyint(double x);
 2959     ///
 2960     pure double rint(double x);
 2961     ///
 2962     c_long lrint(double x);
 2963     ///
 2964     long llrint(double x);
 2965     ///
 2966     pure double round(double x);
 2967     ///
 2968     c_long lround(double x);
 2969     ///
 2970     long  llround(double x);
 2971     ///
 2972     pure double trunc(double x);
 2973     ///
 2974     double remainder(double x , double y);
 2975     ///
 2976     double remquo(double x, double y, int * quo);
 2977     ///
 2978     pure double copysign(double x, double y);
 2979     ///
 2980     pure double nan(const char *);
 2981     ///
 2982     double nextafter(double x, double y);
 2983     ///
 2984     double nexttoward(double x, real y);
 2985     ///
 2986     double fdim(double x, double y);
 2987     ///
 2988     pure double fmax(double x, double y);
 2989     ///
 2990     pure double fmin(double x, double y);
 2991     ///
 2992     pure double fma(double x, double y, double z);
 2993     ///
 2994     double j0(double x);
 2995     ///
 2996     double j1(double x);
 2997     ///
 2998     double jn(int, double);
 2999     ///
 3000     double y0(double x);
 3001     ///
 3002     double y1(double x);
 3003     ///
 3004     double yn(int, double);
 3005     ///
 3006     double gamma(double x);
 3007     ///
 3008     double scalb(double x, double y);
 3009     ///
 3010     double drem(double x, double y);
 3011     ///
 3012     int finite(double x);
 3013     ///
 3014     double gamma_r(double x, int *);
 3015     ///
 3016     double lgamma_r(double x, int *);
 3017     ///
 3018     double significand(double x);
 3019 
 3020     ///
 3021     float acosf(float x);
 3022     ///
 3023     float asinf(float x);
 3024     ///
 3025     pure float atanf(float x);
 3026     ///
 3027     float atan2f(float x, float y);
 3028     ///
 3029     pure float cosf(float x);
 3030     ///
 3031     pure float sinf(float x);
 3032     ///
 3033     pure float tanf(float x);
 3034     ///
 3035     float acoshf(float x);
 3036     ///
 3037     pure float asinhf(float x);
 3038     ///
 3039     float atanhf(float x);
 3040     ///
 3041     float coshf(float x);
 3042     ///
 3043     float sinhf(float x);
 3044     ///
 3045     pure float tanhf(float x);
 3046     ///
 3047     float expf(float x);
 3048     ///
 3049     float exp2f(float x);
 3050     ///
 3051     float expm1f(float x);
 3052     ///
 3053     pure float frexpf(float x, int *exp);
 3054     ///
 3055     int ilogbf(float x);
 3056     ///
 3057     float ldexpf(float x, int exp);
 3058     ///
 3059     float logf(float x);
 3060     ///
 3061     float log10f(float x);
 3062     ///
 3063     float log1pf(float x);
 3064     ///
 3065     float log2f(float x);
 3066     ///
 3067     float logbf(float x);
 3068     ///
 3069     pure float modff(float x, float *iptr);
 3070     ///
 3071     float scalbnf(float x, int y);
 3072     ///
 3073     float scalblnf(float x, c_long y);
 3074     ///
 3075     pure float cbrtf(float x);
 3076     ///
 3077     pure float fabsf(float x);
 3078     ///
 3079     float hypotf(float x, float y);
 3080     ///
 3081     float powf(float x, float y);
 3082     ///
 3083     float sqrtf(float x);
 3084     ///
 3085     pure float erff(float x);
 3086     ///
 3087     float erfcf(float x);
 3088     ///
 3089     float lgammaf(float x);
 3090     ///
 3091     float tgammaf(float x);
 3092     ///
 3093     pure float ceilf(float x);
 3094     ///
 3095     pure float floorf(float x);
 3096     ///
 3097     pure float nearbyintf(float x);
 3098     ///
 3099     pure float rintf(float x);
 3100     ///
 3101     c_long lrintf(float x);
 3102     ///
 3103     long llrintf(float x);
 3104     ///
 3105     pure float roundf(float x);
 3106     ///
 3107     c_long lroundf(float x);
 3108     ///
 3109     long llroundf(float x);
 3110     ///
 3111     pure float truncf(float x);
 3112     ///
 3113     pure float fmodf(float x, float y);
 3114     ///
 3115     float remainderf(float x, float y);
 3116     ///
 3117     float remquof(float x, float y, int *iptr);
 3118     ///
 3119     pure float copysignf(float x, float y);
 3120     ///
 3121     pure float nanf(const char *);
 3122     ///
 3123     float nextafterf(float x, float y);
 3124     ///
 3125     float nexttowardf(float x, real y);
 3126     ///
 3127     float fdimf(float x, float y);
 3128     ///
 3129     pure float fmaxf(float x, float y);
 3130     ///
 3131     pure float fminf(float x, float y);
 3132     ///
 3133     pure float fmaf(float x, float y, float z);
 3134     ///
 3135     float j0f(float x);
 3136     ///
 3137     float j1f(float x);
 3138     ///
 3139     float jnf(int, float);
 3140     ///
 3141     float scalbf(float x, float);
 3142     ///
 3143     float y0f(float x);
 3144     ///
 3145     float y1f(float x);
 3146     ///
 3147     float ynf(int, float);
 3148     ///
 3149     float gammaf(float x);
 3150     ///
 3151     float dremf(float x, float);
 3152     ///
 3153     pure int finitef(float x);
 3154     ///
 3155     pure int isinff(float x);
 3156     ///
 3157     pure int isnanf(float x);
 3158     ///
 3159     float gammaf_r(float x, int *);
 3160     ///
 3161     float lgammaf_r(float x, int *);
 3162     ///
 3163     float significandf(float x);
 3164     ///
 3165 
 3166     ///
 3167     pure real acosl(real x);
 3168     ///
 3169     pure real asinl(real x);
 3170     ///
 3171     pure real atanl(real x);
 3172     ///
 3173     real atan2l(real x, real y);
 3174     ///
 3175     pure real cosl(real x);
 3176     ///
 3177     pure real sinl(real x);
 3178     ///
 3179     pure real tanl(real x);
 3180     ///
 3181     real acoshl(real x);
 3182     ///
 3183     pure real asinhl(real x);
 3184     ///
 3185     real atanhl(real x);
 3186     ///
 3187     real coshl(real x);
 3188     ///
 3189     real sinhl(real x);
 3190     ///
 3191     pure real tanhl(real x);
 3192     ///
 3193     real expl(real x);
 3194     ///
 3195     real exp2l(real x);
 3196     ///
 3197     real expm1l(real x);
 3198     ///
 3199     pure real frexpl(real x, int *exp);
 3200     ///
 3201     int ilogbl(real x);
 3202     ///
 3203     real ldexpl(real x, int exp);
 3204     ///
 3205     real logl(real x);
 3206     ///
 3207     real log10l(real x);
 3208     ///
 3209     real log1pl(real x);
 3210     ///
 3211     real log2l(real x);
 3212     ///
 3213     real logbl(real x);
 3214     ///
 3215     pure real modfl(real x, real *iptr);
 3216     ///
 3217     real scalbnl(real x, int y);
 3218     ///
 3219     real scalblnl(real x, c_long y);
 3220     ///
 3221     pure real cbrtl(real x);
 3222     ///
 3223     pure real fabsl(real x);
 3224     ///
 3225     real hypotl(real x, real y);
 3226     ///
 3227     real powl(real x, real y);
 3228     ///
 3229     real sqrtl(real x);
 3230     ///
 3231     pure real erfl(real x);
 3232     ///
 3233     real erfcl(real x);
 3234     ///
 3235     real lgammal(real x);
 3236     ///
 3237     real tgammal(real x);
 3238     ///
 3239     pure real ceill(real x);
 3240     ///
 3241     pure real floorl(real x);
 3242     ///
 3243     pure real nearbyintl(real x);
 3244     ///
 3245     pure real rintl(real x);
 3246     ///
 3247     c_long lrintl(real x);
 3248     ///
 3249     long llrintl(real x);
 3250     ///
 3251     pure real roundl(real x);
 3252     ///
 3253     c_long lroundl(real x);
 3254     ///
 3255     long llroundl(real x);
 3256     ///
 3257     pure real truncl(real x);
 3258     ///
 3259     pure real fmodl(real x, real);
 3260     ///
 3261     pure real remainderl(real x, real);
 3262     ///
 3263     pure real remquol(real x, real y, int *iptr);
 3264     ///
 3265     pure real copysignl(real x, real y);
 3266     ///
 3267     pure real nanl(const char *);
 3268     ///
 3269     real nextafterl(real x, real y);
 3270     ///
 3271     real nexttowardl(real x, real y);
 3272     ///
 3273     real fdiml(real x, real y);
 3274     ///
 3275     pure real fmaxl(real x, real y);
 3276     ///
 3277     pure real fminl(real x, real y);
 3278     ///
 3279     pure real fmal(real x, real, real);
 3280 }
 3281 else version (DragonFlyBSD)
 3282 {
 3283     /* double */
 3284     double acos(double x);
 3285     double asin(double x);
 3286     pure double atan(double x);
 3287     double atan2(double, double);
 3288     pure double cos(double x);
 3289     pure double sin(double x);
 3290     pure double tan(double x);
 3291 
 3292     double cosh(double x);
 3293     double sinh(double x);
 3294     pure double tanh(double x);
 3295 
 3296     double exp(double x);
 3297     pure double frexp(double, int *exp);
 3298     double ldexp(double, int exp);
 3299     double log(double x);
 3300     double log10(double x);
 3301     pure double modf(double x, double *iptr);
 3302 
 3303     double pow(double x, double y);
 3304     double sqrt(double x);
 3305 
 3306     pure double ceil(double x);
 3307     pure double fabs(double x);
 3308     pure double floor(double x);
 3309     double fmod(double x, double);
 3310 
 3311     double acosh(double x);
 3312     pure double asinh(double x);
 3313     double atanh(double x);
 3314 
 3315     double exp2(double x);
 3316     double expm1(double x);
 3317     int ilogb(double x);
 3318     double log1p(double x);
 3319     double log2(double x);
 3320     double logb(double x);
 3321     double scalbn(double x, int n);
 3322     double scalbln(double x, c_long n);
 3323 
 3324     pure double cbrt(double x);
 3325     double hypot(double x, double y);
 3326 
 3327     pure double erf(double x);
 3328     double erfc(double x);
 3329     double lgamma(double x);
 3330     double tgamma(double x);
 3331 
 3332     pure double nearbyint(double x);
 3333     pure double rint(double x);
 3334     c_long lrint(double x);
 3335     long llrint(double x);
 3336     pure double round(double x);
 3337     c_long lround(double x);
 3338     long  llround(double x);
 3339     pure double trunc(double x);
 3340 
 3341     double remainder(double x , double y);
 3342     double remquo(double x, double y, int * quo);
 3343 
 3344     pure double copysign(double x, double y);
 3345     pure double nan(const char *);
 3346     double nextafter(double x, double y);
 3347     double nexttoward(double x, real y);
 3348 
 3349     double fdim(double x, double y);
 3350     pure double fmax(double x, double y);
 3351     pure double fmin(double x, double y);
 3352 
 3353     pure double fma(double x, double y, double z);
 3354 
 3355     double j0(double x);
 3356     double j1(double x);
 3357     double jn(int, double);
 3358     double y0(double x);
 3359     double y1(double x);
 3360     double yn(int, double);
 3361 
 3362     double gamma(double x);
 3363     double scalb(double x, double y);
 3364 
 3365     double drem(double x, double y);
 3366     int finite(double x);
 3367     double gamma_r(double x, int *);
 3368     double lgamma_r(double x, int *);
 3369 
 3370     double significand(double x);
 3371 
 3372     /* float */
 3373     float acosf(float x);
 3374     float asinf(float x);
 3375     pure float atanf(float x);
 3376     float atan2f(float x, float y);
 3377     pure float cosf(float x);
 3378     pure float sinf(float x);
 3379     pure float tanf(float x);
 3380 
 3381     float acoshf(float x);
 3382     pure float asinhf(float x);
 3383     float atanhf(float x);
 3384     float coshf(float x);
 3385     float sinhf(float x);
 3386     pure float tanhf(float x);
 3387 
 3388     float expf(float x);
 3389     float exp2f(float x);
 3390     float expm1f(float x);
 3391     pure float frexpf(float x, int *exp);
 3392     int ilogbf(float x);
 3393     float ldexpf(float x, int exp);
 3394     float logf(float x);
 3395     float log10f(float x);
 3396     float log1pf(float x);
 3397     float log2f(float x);
 3398     float logbf(float x);
 3399     pure float modff(float x, float *iptr);
 3400     float scalbnf(float x, int y);
 3401     float scalblnf(float x, c_long y);
 3402 
 3403     pure float cbrtf(float x);
 3404     pure float fabsf(float x);
 3405     float hypotf(float x, float y);
 3406     float powf(float x, float y);
 3407     float sqrtf(float x);
 3408 
 3409     pure float erff(float x);
 3410     float erfcf(float x);
 3411     float lgammaf(float x);
 3412     float tgammaf(float x);
 3413 
 3414     pure float ceilf(float x);
 3415     pure float floorf(float x);
 3416     pure float nearbyintf(float x);
 3417     pure float rintf(float x);
 3418     c_long lrintf(float x);
 3419     long llrintf(float x);
 3420     pure float roundf(float x);
 3421     c_long lroundf(float x);
 3422     long llroundf(float x);
 3423     pure float truncf(float x);
 3424 
 3425     pure float fmodf(float x, float y);
 3426     float remainderf(float x, float y);
 3427     float remquof(float x, float y, int *iptr);
 3428 
 3429     pure float copysignf(float x, float y);
 3430     pure float nanf(const char *);
 3431     float nextafterf(float x, float y);
 3432     float nexttowardf(float x, real y);
 3433 
 3434     float fdimf(float x, float y);
 3435     pure float fmaxf(float x, float y);
 3436     pure float fminf(float x, float y);
 3437 
 3438     pure float fmaf(float x, float y, float z);
 3439 
 3440     float j0f(float x);
 3441     float j1f(float x);
 3442     float jnf(int, float);
 3443     float scalbf(float x, float);
 3444     float y0f(float x);
 3445     float y1f(float x);
 3446     float ynf(int, float);
 3447     float gammaf(float x);
 3448     float dremf(float x, float);
 3449     pure int finitef(float x);
 3450     pure int isinff(float x);
 3451     pure int isnanf(float x);
 3452 
 3453     float gammaf_r(float x, int *);
 3454     float lgammaf_r(float x, int *);
 3455     float significandf(float x);
 3456 
 3457     /* real */
 3458     pure real acosl(real x);
 3459     pure real asinl(real x);
 3460     pure real atanl(real x);
 3461     real atan2l(real x, real y);
 3462     pure real cosl(real x);
 3463     pure real sinl(real x);
 3464     pure real tanl(real x);
 3465 
 3466     real acoshl(real x);
 3467     pure real asinhl(real x);
 3468     real atanhl(real x);
 3469     real coshl(real x);
 3470     real sinhl(real x);
 3471     pure real tanhl(real x);
 3472 
 3473     real expl(real x);
 3474     real exp2l(real x);
 3475     real expm1l(real x);
 3476     pure real frexpl(real x, int *exp);
 3477     int ilogbl(real x);
 3478     real ldexpl(real x, int exp);
 3479     real logl(real x);
 3480     real log10l(real x);
 3481     real log1pl(real x);
 3482     real log2l(real x);
 3483     real logbl(real x);
 3484     pure real modfl(real x, real *iptr);
 3485     real scalbnl(real x, int y);
 3486     real scalblnl(real x, c_long y);
 3487 
 3488     pure real cbrtl(real x);
 3489     pure real fabsl(real x);
 3490     real hypotl(real x, real y);
 3491     real powl(real x, real y);
 3492     real sqrtl(real x);
 3493 
 3494     pure real erfl(real x);
 3495     real erfcl(real x);
 3496     real lgammal(real x);
 3497     real tgammal(real x);
 3498 
 3499     pure real ceill(real x);
 3500     pure real floorl(real x);
 3501     pure real nearbyintl(real x);
 3502     pure real rintl(real x);
 3503     c_long lrintl(real x);
 3504     long llrintl(real x);
 3505     pure real roundl(real x);
 3506     c_long lroundl(real x);
 3507     long llroundl(real x);
 3508     pure real truncl(real x);
 3509 
 3510     pure real fmodl(real x, real);
 3511     pure real remainderl(real x, real);
 3512     pure real remquol(real x, real y, int *iptr);
 3513 
 3514     pure real copysignl(real x, real y);
 3515     pure real nanl(const char *);
 3516     real nextafterl(real x, real y);
 3517     real nexttowardl(real x, real y);
 3518 
 3519     real fdiml(real x, real y);
 3520     pure real fmaxl(real x, real y);
 3521     pure real fminl(real x, real y);
 3522 
 3523     pure real fmal(real x, real, real);
 3524 }
 3525 else version (CRuntime_Bionic)
 3526 {
 3527     ///
 3528     double  acos(double x);
 3529     ///
 3530     float   acosf(float x);
 3531     /// Added since Lollipop
 3532     real    acosl(real x);
 3533 
 3534     ///
 3535     double  asin(double x);
 3536     ///
 3537     float   asinf(float x);
 3538     /// Added since Lollipop
 3539     real    asinl(real x);
 3540 
 3541     ///
 3542     pure double  atan(double x);
 3543     ///
 3544     pure float   atanf(float x);
 3545     /// Added since Lollipop
 3546     pure real    atanl(real x);
 3547 
 3548     ///
 3549     double  atan2(double y, double x);
 3550     ///
 3551     float   atan2f(float y, float x);
 3552     /// Added since Lollipop
 3553     real    atan2l(real y, real x);
 3554 
 3555     ///
 3556     pure double  cos(double x);
 3557     ///
 3558     pure float   cosf(float x);
 3559     ///
 3560     pure real    cosl(real x);
 3561 
 3562     ///
 3563     pure double  sin(double x);
 3564     ///
 3565     pure float   sinf(float x);
 3566     /// Added since Lollipop
 3567     pure real    sinl(real x);
 3568 
 3569     ///
 3570     pure double  tan(double x);
 3571     ///
 3572     pure float   tanf(float x);
 3573     /// Added since Lollipop
 3574     pure real    tanl(real x);
 3575 
 3576     ///
 3577     double  acosh(double x);
 3578     ///
 3579     float   acoshf(float x);
 3580     /// Added since Lollipop
 3581     real    acoshl(real x);
 3582 
 3583     ///
 3584     pure double  asinh(double x);
 3585     ///
 3586     pure float   asinhf(float x);
 3587     /// Added since Lollipop
 3588     pure real    asinhl(real x);
 3589 
 3590     ///
 3591     double  atanh(double x);
 3592     ///
 3593     float   atanhf(float x);
 3594     /// Added since Lollipop
 3595     real    atanhl(real x);
 3596 
 3597     ///
 3598     double  cosh(double x);
 3599     ///
 3600     float   coshf(float x);
 3601     /// Added since Lollipop
 3602     real    coshl(real x);
 3603 
 3604     ///
 3605     double  sinh(double x);
 3606     ///
 3607     float   sinhf(float x);
 3608     /// Added since Lollipop
 3609     real    sinhl(real x);
 3610 
 3611     ///
 3612     pure double  tanh(double x);
 3613     ///
 3614     pure float   tanhf(float x);
 3615     /// Added since Lollipop
 3616     pure real    tanhl(real x);
 3617 
 3618     ///
 3619     double  exp(double x);
 3620     ///
 3621     float   expf(float x);
 3622     ///
 3623     real    expl(real x);
 3624 
 3625     ///
 3626     double  exp2(double x);
 3627     ///
 3628     float   exp2f(float x);
 3629     /// Added since Lollipop
 3630     real    exp2l(real x);
 3631 
 3632     ///
 3633     double  expm1(double x);
 3634     ///
 3635     float   expm1f(float x);
 3636     /// Added since Lollipop
 3637     real    expm1l(real x);
 3638 
 3639     ///
 3640     pure double  frexp(double value, int* exp);
 3641     ///
 3642     pure float   frexpf(float value, int* exp);
 3643     /// Added since Lollipop
 3644     pure real    frexpl(real value, int* exp);
 3645 
 3646     ///
 3647     int     ilogb(double x);
 3648     ///
 3649     int     ilogbf(float x);
 3650     ///
 3651     int     ilogbl(real x);
 3652 
 3653     ///
 3654     double  ldexp(double x, int exp);
 3655     ///
 3656     float   ldexpf(float x, int exp);
 3657     ///
 3658     real    ldexpl(real x, int exp);
 3659 
 3660     ///
 3661     double  log(double x);
 3662     ///
 3663     float   logf(float x);
 3664     /// Added since Lollipop
 3665     real    logl(real x);
 3666 
 3667     ///
 3668     double  log10(double x);
 3669     ///
 3670     float   log10f(float x);
 3671     /// Added since Lollipop
 3672     real    log10l(real x);
 3673 
 3674     ///
 3675     double  log1p(double x);
 3676     ///
 3677     float   log1pf(float x);
 3678     /// Added since Lollipop
 3679     real    log1pl(real x);
 3680 
 3681     ///
 3682     double  log2(double x);
 3683     ///
 3684     float   log2f(float x);
 3685     ///
 3686     real    log2l(real x);
 3687 
 3688     ///
 3689     double  logb(double x);
 3690     ///
 3691     float   logbf(float x);
 3692     ///
 3693     real    logbl(real x);
 3694 
 3695     ///
 3696     pure double  modf(double value, double* iptr);
 3697     ///
 3698     pure float   modff(float value, float* iptr);
 3699     /// Added since Lollipop
 3700     pure real    modfl(real value, real *iptr);
 3701 
 3702     ///
 3703     double  scalbn(double x, int n);
 3704     ///
 3705     float   scalbnf(float x, int n);
 3706     ///
 3707     real    scalbnl(real x, int n);
 3708 
 3709     ///
 3710     double  scalbln(double x, c_long n);
 3711     ///
 3712     float   scalblnf(float x, c_long n);
 3713     ///
 3714     real    scalblnl(real x, c_long n);
 3715 
 3716     ///
 3717     pure double  cbrt(double x);
 3718     ///
 3719     pure float   cbrtf(float x);
 3720     /// Added since Lollipop
 3721     pure real    cbrtl(real x);
 3722 
 3723     ///
 3724     pure double  fabs(double x);
 3725     ///
 3726     pure float   fabsf(float x);
 3727     ///
 3728     pure real    fabsl(real x);
 3729 
 3730     ///
 3731     double  hypot(double x, double y);
 3732     ///
 3733     float   hypotf(float x, float y);
 3734     /// Added since Lollipop
 3735     real    hypotl(real x, real y);
 3736 
 3737     ///
 3738     double  pow(double x, double y);
 3739     ///
 3740     float   powf(float x, float y);
 3741     /// Added since Lollipop
 3742     real    powl(real x, real y);
 3743 
 3744     ///
 3745     double  sqrt(double x);
 3746     ///
 3747     float   sqrtf(float x);
 3748     /// Added since Lollipop
 3749     real    sqrtl(real x);
 3750 
 3751     ///
 3752     pure double  erf(double x);
 3753     ///
 3754     pure float   erff(float x);
 3755     /// Added since Lollipop
 3756     pure real    erfl(real x);
 3757 
 3758     ///
 3759     double  erfc(double x);
 3760     ///
 3761     float   erfcf(float x);
 3762     /// Added since Lollipop
 3763     real    erfcl(real x);
 3764 
 3765     ///
 3766     double  lgamma(double x);
 3767     ///
 3768     float   lgammaf(float x);
 3769     /// Added since Lollipop
 3770     real    lgammal(real x);
 3771 
 3772     ///
 3773     double  tgamma(double x);
 3774     ///
 3775     float   tgammaf(float x);
 3776     /// Added since Lollipop
 3777     real    tgammal(real x);
 3778 
 3779     ///
 3780     pure double  ceil(double x);
 3781     ///
 3782     pure float   ceilf(float x);
 3783     ///
 3784     pure real    ceill(real x);
 3785 
 3786     ///
 3787     pure double  floor(double x);
 3788     ///
 3789     pure float   floorf(float x);
 3790     ///
 3791     pure real    floorl(real x);
 3792 
 3793     ///
 3794     pure double  nearbyint(double x);
 3795     ///
 3796     pure float   nearbyintf(float x);
 3797     /// Added since Lollipop
 3798     pure real    nearbyintl(real x);
 3799 
 3800     ///
 3801     pure double  rint(double x);
 3802     ///
 3803     pure float   rintf(float x);
 3804     /// Added since Lollipop
 3805     pure real    rintl(real x);
 3806 
 3807     ///
 3808     c_long  lrint(double x);
 3809     ///
 3810     c_long  lrintf(float x);
 3811     /// Added since Lollipop
 3812     c_long  lrintl(real x);
 3813 
 3814     ///
 3815     long    llrint(double x);
 3816     ///
 3817     long    llrintf(float x);
 3818     /// Added since Lollipop
 3819     long    llrintl(real x);
 3820 
 3821     ///
 3822     pure double  round(double x);
 3823     ///
 3824     pure float   roundf(float x);
 3825     ///
 3826     pure real    roundl(real x);
 3827 
 3828     ///
 3829     c_long  lround(double x);
 3830     ///
 3831     c_long  lroundf(float x);
 3832     ///
 3833     c_long  lroundl(real x);
 3834 
 3835     ///
 3836     long    llround(double x);
 3837     ///
 3838     long    llroundf(float x);
 3839     ///
 3840     long    llroundl(real x);
 3841 
 3842     ///
 3843     pure double  trunc(double x);
 3844     ///
 3845     pure float   truncf(float x);
 3846     ///
 3847     pure real    truncl(real x);
 3848 
 3849     ///
 3850     double  fmod(double x, double y);
 3851     ///
 3852     float   fmodf(float x, float y);
 3853     /// Added since Lollipop
 3854     real    fmodl(real x, real y);
 3855 
 3856     ///
 3857     double  remainder(double x, double y);
 3858     ///
 3859     float   remainderf(float x, float y);
 3860     /// Added since Lollipop
 3861     real    remainderl(real x, real y);
 3862 
 3863     ///
 3864     double  remquo(double x, double y, int* quo);
 3865     ///
 3866     float   remquof(float x, float y, int* quo);
 3867     /// Added since Lollipop
 3868     real    remquol(real x, real y, int* quo);
 3869 
 3870     ///
 3871     pure double  copysign(double x, double y);
 3872     ///
 3873     pure float   copysignf(float x, float y);
 3874     ///
 3875     pure real    copysignl(real x, real y);
 3876 
 3877     ///
 3878     pure double  nan(char* tagp);
 3879     ///
 3880     pure float   nanf(char* tagp);
 3881     ///
 3882     pure real    nanl(char* tagp);
 3883 
 3884     ///
 3885     double  nextafter(double x, double y);
 3886     ///
 3887     float   nextafterf(float x, float y);
 3888     /// Added since Lollipop
 3889     real    nextafterl(real x, real y);
 3890 
 3891     ///
 3892     double  nexttoward(double x, real y);
 3893     ///
 3894     float   nexttowardf(float x, real y);
 3895     ///
 3896     real    nexttowardl(real x, real y);
 3897 
 3898     ///
 3899     double  fdim(double x, double y);
 3900     ///
 3901     float   fdimf(float x, float y);
 3902     ///
 3903     real    fdiml(real x, real y);
 3904 
 3905     ///
 3906     pure double  fmax(double x, double y);
 3907     ///
 3908     pure float   fmaxf(float x, float y);
 3909     ///
 3910     pure real    fmaxl(real x, real y);
 3911 
 3912     ///
 3913     pure double  fmin(double x, double y);
 3914     ///
 3915     pure float   fminf(float x, float y);
 3916     ///
 3917     pure real    fminl(real x, real y);
 3918 
 3919     ///
 3920     pure double  fma(double x, double y, double z);
 3921     ///
 3922     pure float   fmaf(float x, float y, float z);
 3923     /// Added since Lollipop
 3924     pure real    fmal(real x, real y, real z);
 3925 }
 3926 else version (CRuntime_UClibc)
 3927 {
 3928     // uClibc wraps 'long double' to double, so we do the same for 'real'
 3929 
 3930     ///
 3931     double  acos(double x);
 3932     ///
 3933     float   acosf(float x);
 3934     ///
 3935     extern(D) real acosl(real x) { return acos(cast(double) x); }
 3936 
 3937     ///
 3938     double  asin(double x);
 3939     ///
 3940     float   asinf(float x);
 3941     ///
 3942     extern(D) real asinl(real x) { return asin(cast(double) x); }
 3943 
 3944     ///
 3945     pure double  atan(double x);
 3946     ///
 3947     pure float   atanf(float x);
 3948     ///
 3949     extern(D) pure real atanl(real x) { return atan(cast(double) x); }
 3950 
 3951     ///
 3952     double  atan2(double y, double x);
 3953     ///
 3954     float   atan2f(float y, float x);
 3955     ///
 3956     extern(D) real atan2l(real y, real x) { return atan2(cast(double) x, cast(double) y); }
 3957 
 3958     ///
 3959     pure double  cos(double x);
 3960     ///
 3961     pure float   cosf(float x);
 3962     ///
 3963     extern(D) pure real cosl(real x) { return cos(cast(double) x); }
 3964 
 3965     ///
 3966     pure double  sin(double x);
 3967     ///
 3968     pure float   sinf(float x);
 3969     ///
 3970     extern(D) pure real sinl(real x) { return sin(cast(double) x); }
 3971 
 3972     ///
 3973     pure double  tan(double x);
 3974     ///
 3975     pure float   tanf(float x);
 3976     ///
 3977     extern(D) pure real tanl(real x) { return tan(cast(double) x); }
 3978 
 3979     ///
 3980     double  acosh(double x);
 3981     ///
 3982     float   acoshf(float x);
 3983     ///
 3984     extern(D) real acoshl(real x) { return acosh(cast(double) x); }
 3985 
 3986     ///
 3987     pure double  asinh(double x);
 3988     ///
 3989     pure float   asinhf(float x);
 3990     ///
 3991     extern(D) pure real asinhl(real x) { return asinh(cast(double) x); }
 3992 
 3993     ///
 3994     double  atanh(double x);
 3995     ///
 3996     float   atanhf(float x);
 3997     ///
 3998     extern(D) real atanhl(real x) { return atanh(cast(double) x); }
 3999 
 4000     ///
 4001     double  cosh(double x);
 4002     ///
 4003     float   coshf(float x);
 4004     ///
 4005     extern(D) real coshl(real x) { return cosh(cast(double) x); }
 4006 
 4007     ///
 4008     double  sinh(double x);
 4009     ///
 4010     float   sinhf(float x);
 4011     ///
 4012     extern(D) real sinhl(real x) { return sinh(cast(double) x); }
 4013 
 4014     ///
 4015     double  tanh(double x);
 4016     ///
 4017     float   tanhf(float x);
 4018     ///
 4019     extern(D) real tanhl(real x) { return tanh(cast(double) x); }
 4020 
 4021     ///
 4022     double  exp(double x);
 4023     ///
 4024     float   expf(float x);
 4025     ///
 4026     extern(D) real expl(real x) { return exp(cast(double) x); }
 4027 
 4028     ///
 4029     double  exp2(double x);
 4030     ///
 4031     float   exp2f(float x);
 4032     ///
 4033     extern(D) real exp2l(real x) { return exp2(cast(double) x); }
 4034 
 4035     ///
 4036     double  expm1(double x);
 4037     ///
 4038     float   expm1f(float x);
 4039     ///
 4040     extern(D) real expm1l(real x) { return expm1(cast(double) x); }
 4041 
 4042     ///
 4043     pure double  frexp(double value, int* exp);
 4044     ///
 4045     pure float   frexpf(float value, int* exp);
 4046     ///
 4047     extern(D) pure real frexpl(real value, int* exp) { return frexp(cast(double) value, exp); }
 4048 
 4049     ///
 4050     int     ilogb(double x);
 4051     ///
 4052     int     ilogbf(float x);
 4053     ///
 4054     extern(D) int ilogbl(real x) { return ilogb(cast(double) x); }
 4055 
 4056     ///
 4057     double  ldexp(double x, int exp);
 4058     ///
 4059     float   ldexpf(float x, int exp);
 4060     ///
 4061     extern(D) real ldexpl(real x, int exp) { return ldexp(cast(double) x, exp); }
 4062 
 4063     ///
 4064     double  log(double x);
 4065     ///
 4066     float   logf(float x);
 4067     ///
 4068     extern(D) real logl(real x) { return log(cast(double) x); }
 4069 
 4070     ///
 4071     double  log10(double x);
 4072     ///
 4073     float   log10f(float x);
 4074     ///
 4075     extern(D) real log10l(real x) { return log10(cast(double) x); }
 4076 
 4077     ///
 4078     double  log1p(double x);
 4079     ///
 4080     float   log1pf(float x);
 4081     ///
 4082     extern(D) real log1pl(real x) { return log1p(cast(double) x); }
 4083 
 4084     ///
 4085     double  log2(double x);
 4086     ///
 4087     float   log2f(float x);
 4088     ///
 4089     extern(D) real log2l(real x) { return log2(cast(double) x); }
 4090 
 4091     ///
 4092     double  logb(double x);
 4093     ///
 4094     float   logbf(float x);
 4095     ///
 4096     extern(D) real logbl(real x) { return logb(cast(double) x); }
 4097 
 4098     ///
 4099     pure double  modf(double value, double* iptr);
 4100     ///
 4101     pure float   modff(float value, float* iptr);
 4102     ///
 4103     extern(D) pure real modfl(real value, real *iptr) { return modf(cast(double) value, cast(double*) iptr); }
 4104 
 4105     ///
 4106     double  scalbn(double x, int n);
 4107     ///
 4108     float   scalbnf(float x, int n);
 4109     ///
 4110     extern(D) real scalbnl(real x, int n) { return scalbln(cast(double) x, n); }
 4111 
 4112     ///
 4113     double  scalbln(double x, c_long n);
 4114     ///
 4115     float   scalblnf(float x, c_long n);
 4116     ///
 4117     extern(D) real scalblnl(real x, c_long n) { return scalbln(cast(double) x, n); }
 4118 
 4119     ///
 4120     pure double  cbrt(double x);
 4121     ///
 4122     pure float   cbrtf(float x);
 4123     ///
 4124     extern(D) pure real cbrtl(real x) { return cbrt(cast(double) x); }
 4125 
 4126     ///
 4127     pure double  fabs(double x);
 4128     ///
 4129     pure float   fabsf(float x);
 4130     ///
 4131     extern(D) pure real fabsl(real x) { return fabs(cast(double) x); }
 4132 
 4133     ///
 4134     double  hypot(double x, double y);
 4135     ///
 4136     float   hypotf(float x, float y);
 4137     ///
 4138     extern(D) real hypotl(real x, real y) { return hypot(cast(double) x, cast(double) y); }
 4139 
 4140     ///
 4141     double  pow(double x, double y);
 4142     ///
 4143     float   powf(float x, float y);
 4144     ///
 4145     extern(D) real powl(real x, real y) { return pow(cast(double) x, cast(double) y); }
 4146 
 4147     ///
 4148     double  sqrt(double x);
 4149     ///
 4150     float   sqrtf(float x);
 4151     ///
 4152     extern(D) real sqrtl(real x) { return sqrt(cast(double) x); }
 4153 
 4154     ///
 4155     pure double  erf(double x);
 4156     ///
 4157     pure float   erff(float x);
 4158     ///
 4159     extern(D) pure real erfl(real x) { return erf(cast(double) x); }
 4160 
 4161     ///
 4162     double  erfc(double x);
 4163     ///
 4164     float   erfcf(float x);
 4165     ///
 4166     extern(D) real erfcl(real x) { return erfc(cast(double) x); }
 4167 
 4168     ///
 4169     double  lgamma(double x);
 4170     ///
 4171     float   lgammaf(float x);
 4172     ///
 4173     extern(D) real lgammal(real x) { return lgamma(cast(double) x); }
 4174 
 4175     ///
 4176     double  tgamma(double x);
 4177     ///
 4178     float   tgammaf(float x);
 4179     ///
 4180     extern(D) real tgammal(real x) { return tgamma(cast(double) x); }
 4181 
 4182     ///
 4183     pure double  ceil(double x);
 4184     ///
 4185     pure float   ceilf(float x);
 4186     ///
 4187     extern(D) pure real ceill(real x) { return ceil(cast(double) x); }
 4188 
 4189     ///
 4190     pure double  floor(double x);
 4191     ///
 4192     pure float   floorf(float x);
 4193     ///
 4194     extern(D) pure real floorl(real x) { return floor(cast(double) x); }
 4195 
 4196     ///
 4197     pure double  nearbyint(double x);
 4198     ///
 4199     pure float   nearbyintf(float x);
 4200     ///
 4201     extern(D) pure real nearbyintl(real x) { return nearbyint(cast(double) x); }
 4202 
 4203     ///
 4204     pure double  rint(double x);
 4205     ///
 4206     pure float   rintf(float x);
 4207     ///
 4208     extern(D) pure real rintl(real x) { return rint(cast(double) x); }
 4209 
 4210     ///
 4211     c_long  lrint(double x);
 4212     ///
 4213     c_long  lrintf(float x);
 4214     ///
 4215     extern(D) c_long lrintl(real x) { return lrint(cast(double) x); }
 4216 
 4217     ///
 4218     long    llrint(double x);
 4219     ///
 4220     long    llrintf(float x);
 4221     ///
 4222     extern(D) long llrintl(real x) { return llrint(cast(double) x); }
 4223 
 4224     ///
 4225     pure double  round(double x);
 4226     ///
 4227     pure float   roundf(float x);
 4228     ///
 4229     extern(D) pure real roundl(real x) { return round(cast(double) x); }
 4230 
 4231     ///
 4232     c_long  lround(double x);
 4233     ///
 4234     c_long  lroundf(float x);
 4235     ///
 4236     extern(D) c_long lroundl(real x) { return lround(cast(double) x); }
 4237 
 4238     ///
 4239     long    llround(double x);
 4240     ///
 4241     long    llroundf(float x);
 4242     ///
 4243     extern(D) long llroundl(real x) { return llround(cast(double) x); }
 4244 
 4245     ///
 4246     pure double  trunc(double x);
 4247     ///
 4248     pure float   truncf(float x);
 4249     ///
 4250     extern(D) pure real truncl(real x) { return trunc(cast(double) x); }
 4251 
 4252     ///
 4253     double  fmod(double x, double y);
 4254     ///
 4255     float   fmodf(float x, float y);
 4256     ///
 4257     extern(D) real fmodl(real x, real y) { return fmod(cast(double) x, cast(double) y); }
 4258 
 4259     ///
 4260     double  remainder(double x, double y);
 4261     ///
 4262     float   remainderf(float x, float y);
 4263     ///
 4264     extern(D) real remainderl(real x, real y) { return remainder(cast(double) x, cast(double) y); }
 4265 
 4266     ///
 4267     double  remquo(double x, double y, int* quo);
 4268     ///
 4269     float   remquof(float x, float y, int* quo);
 4270     ///
 4271     extern(D) real remquol(real x, real y, int* quo) { return remquo(cast(double) x, cast(double) y, quo); }
 4272 
 4273     ///
 4274     pure double  copysign(double x, double y);
 4275     ///
 4276     pure float   copysignf(float x, float y);
 4277     ///
 4278     extern(D) pure real copysignl(real x, real y) { return copysign(cast(double) x, cast(double) y); }
 4279 
 4280     ///
 4281     pure double  nan(char* tagp);
 4282     ///
 4283     pure float   nanf(char* tagp);
 4284     ///
 4285     extern(D) pure real nanl(char* tagp) { return nan(tagp); }
 4286 
 4287     ///
 4288     double  nextafter(double x, double y);
 4289     ///
 4290     float   nextafterf(float x, float y);
 4291     ///
 4292     extern(D) real nextafterl(real x, real y) { return nextafter(cast(double) x, cast(double) y); }
 4293 
 4294     ///
 4295     double  nexttoward(double x, real y);
 4296     ///
 4297     float   nexttowardf(float x, real y);
 4298     ///
 4299     extern(D) real nexttowardl(real x, real y) { return nexttoward(cast(double) x, cast(double) y); }
 4300 
 4301     ///
 4302     double  fdim(double x, double y);
 4303     ///
 4304     float   fdimf(float x, float y);
 4305     ///
 4306     extern(D) real fdiml(real x, real y) { return fdim(cast(double) x, cast(double) y); }
 4307 
 4308     ///
 4309     pure double  fmax(double x, double y);
 4310     ///
 4311     pure float   fmaxf(float x, float y);
 4312     ///
 4313     extern(D) pure real fmaxl(real x, real y) { return fmax(cast(double) x, cast(double) y); }
 4314 
 4315     ///
 4316     pure double  fmin(double x, double y);
 4317     ///
 4318     pure float   fminf(float x, float y);
 4319     ///
 4320     extern(D) pure real fminl(real x, real y) { return fmin(cast(double) x, cast(double) y); }
 4321 
 4322     ///
 4323     pure double  fma(double x, double y, double z);
 4324     ///
 4325     pure float   fmaf(float x, float y, float z);
 4326     ///
 4327     extern(D) pure real fmal(real x, real y, real z) { return fma(cast(double) x, cast(double) y, cast(double) z); }
 4328 }
 4329 else
 4330 {
 4331     ///
 4332     double  acos(double x);
 4333     ///
 4334     float   acosf(float x);
 4335     ///
 4336     real    acosl(real x);
 4337 
 4338     ///
 4339     double  asin(double x);
 4340     ///
 4341     float   asinf(float x);
 4342     ///
 4343     real    asinl(real x);
 4344 
 4345     ///
 4346     pure double  atan(double x);
 4347     ///
 4348     pure float   atanf(float x);
 4349     ///
 4350     pure real    atanl(real x);
 4351 
 4352     ///
 4353     double  atan2(double y, double x);
 4354     ///
 4355     float   atan2f(float y, float x);
 4356     ///
 4357     real    atan2l(real y, real x);
 4358 
 4359     ///
 4360     pure double  cos(double x);
 4361     ///
 4362     pure float   cosf(float x);
 4363     ///
 4364     pure real    cosl(real x);
 4365 
 4366     ///
 4367     pure double  sin(double x);
 4368     ///
 4369     pure float   sinf(float x);
 4370     ///
 4371     pure real    sinl(real x);
 4372 
 4373     ///
 4374     pure double  tan(double x);
 4375     ///
 4376     pure float   tanf(float x);
 4377     ///
 4378     pure real    tanl(real x);
 4379 
 4380     ///
 4381     double  acosh(double x);
 4382     ///
 4383     float   acoshf(float x);
 4384     ///
 4385     real    acoshl(real x);
 4386 
 4387     ///
 4388     pure double  asinh(double x);
 4389     ///
 4390     pure float   asinhf(float x);
 4391     ///
 4392     pure real    asinhl(real x);
 4393 
 4394     ///
 4395     double  atanh(double x);
 4396     ///
 4397     float   atanhf(float x);
 4398     ///
 4399     real    atanhl(real x);
 4400 
 4401     ///
 4402     double  cosh(double x);
 4403     ///
 4404     float   coshf(float x);
 4405     ///
 4406     real    coshl(real x);
 4407 
 4408     ///
 4409     double  sinh(double x);
 4410     ///
 4411     float   sinhf(float x);
 4412     ///
 4413     real    sinhl(real x);
 4414 
 4415     ///
 4416     pure double  tanh(double x);
 4417     ///
 4418     pure float   tanhf(float x);
 4419     ///
 4420     pure real    tanhl(real x);
 4421 
 4422     ///
 4423     double  exp(double x);
 4424     ///
 4425     float   expf(float x);
 4426     ///
 4427     real    expl(real x);
 4428 
 4429     ///
 4430     double  exp2(double x);
 4431     ///
 4432     float   exp2f(float x);
 4433     ///
 4434     real    exp2l(real x);
 4435 
 4436     ///
 4437     double  expm1(double x);
 4438     ///
 4439     float   expm1f(float x);
 4440     ///
 4441     real    expm1l(real x);
 4442 
 4443     ///
 4444     pure double  frexp(double value, int* exp);
 4445     ///
 4446     pure float   frexpf(float value, int* exp);
 4447     ///
 4448     pure real    frexpl(real value, int* exp);
 4449 
 4450     ///
 4451     int     ilogb(double x);
 4452     ///
 4453     int     ilogbf(float x);
 4454     ///
 4455     int     ilogbl(real x);
 4456 
 4457     ///
 4458     double  ldexp(double x, int exp);
 4459     ///
 4460     float   ldexpf(float x, int exp);
 4461     ///
 4462     real    ldexpl(real x, int exp);
 4463 
 4464     ///
 4465     double  log(double x);
 4466     ///
 4467     float   logf(float x);
 4468     ///
 4469     real    logl(real x);
 4470 
 4471     ///
 4472     double  log10(double x);
 4473     ///
 4474     float   log10f(float x);
 4475     ///
 4476     real    log10l(real x);
 4477 
 4478     ///
 4479     double  log1p(double x);
 4480     ///
 4481     float   log1pf(float x);
 4482     ///
 4483     real    log1pl(real x);
 4484 
 4485     ///
 4486     double  log2(double x);
 4487     ///
 4488     float   log2f(float x);
 4489     ///
 4490     real    log2l(real x);
 4491 
 4492     ///
 4493     double  logb(double x);
 4494     ///
 4495     float   logbf(float x);
 4496     ///
 4497     real    logbl(real x);
 4498 
 4499     ///
 4500     pure double  modf(double value, double* iptr);
 4501     ///
 4502     pure float   modff(float value, float* iptr);
 4503     ///
 4504     pure real    modfl(real value, real *iptr);
 4505 
 4506     ///
 4507     double  scalbn(double x, int n);
 4508     ///
 4509     float   scalbnf(float x, int n);
 4510     ///
 4511     real    scalbnl(real x, int n);
 4512 
 4513     ///
 4514     double  scalbln(double x, c_long n);
 4515     ///
 4516     float   scalblnf(float x, c_long n);
 4517     ///
 4518     real    scalblnl(real x, c_long n);
 4519 
 4520     ///
 4521     pure double  cbrt(double x);
 4522     ///
 4523     pure float   cbrtf(float x);
 4524     ///
 4525     pure real    cbrtl(real x);
 4526 
 4527     ///
 4528     pure double  fabs(double x);
 4529     version (CRuntime_Microsoft)
 4530     {
 4531     }
 4532     else
 4533     {
 4534         ///
 4535         pure float   fabsf(float x);
 4536         ///
 4537         pure real    fabsl(real x);
 4538     }
 4539 
 4540     ///
 4541     double  hypot(double x, double y);
 4542     ///
 4543     float   hypotf(float x, float y);
 4544     ///
 4545     real    hypotl(real x, real y);
 4546 
 4547     ///
 4548     double  pow(double x, double y);
 4549     ///
 4550     float   powf(float x, float y);
 4551     ///
 4552     real    powl(real x, real y);
 4553 
 4554     ///
 4555     double  sqrt(double x);
 4556     ///
 4557     float   sqrtf(float x);
 4558     ///
 4559     real    sqrtl(real x);
 4560 
 4561     ///
 4562     pure double  erf(double x);
 4563     ///
 4564     pure float   erff(float x);
 4565     ///
 4566     pure real    erfl(real x);
 4567 
 4568     ///
 4569     double  erfc(double x);
 4570     ///
 4571     float   erfcf(float x);
 4572     ///
 4573     real    erfcl(real x);
 4574 
 4575     ///
 4576     double  lgamma(double x);
 4577     ///
 4578     float   lgammaf(float x);
 4579     ///
 4580     real    lgammal(real x);
 4581 
 4582     ///
 4583     double  tgamma(double x);
 4584     ///
 4585     float   tgammaf(float x);
 4586     ///
 4587     real    tgammal(real x);
 4588 
 4589     ///
 4590     pure double  ceil(double x);
 4591     ///
 4592     pure float   ceilf(float x);
 4593     ///
 4594     pure real    ceill(real x);
 4595 
 4596     ///
 4597     pure double  floor(double x);
 4598     ///
 4599     pure float   floorf(float x);
 4600     ///
 4601     pure real    floorl(real x);
 4602 
 4603     ///
 4604     pure double  nearbyint(double x);
 4605     ///
 4606     pure float   nearbyintf(float x);
 4607     ///
 4608     pure real    nearbyintl(real x);
 4609 
 4610     ///
 4611     pure double  rint(double x);
 4612     ///
 4613     pure float   rintf(float x);
 4614     ///
 4615     pure real    rintl(real x);
 4616 
 4617     ///
 4618     c_long  lrint(double x);
 4619     ///
 4620     c_long  lrintf(float x);
 4621     ///
 4622     c_long  lrintl(real x);
 4623 
 4624     ///
 4625     long    llrint(double x);
 4626     ///
 4627     long    llrintf(float x);
 4628     ///
 4629     long    llrintl(real x);
 4630 
 4631     ///
 4632     pure double  round(double x);
 4633     ///
 4634     pure float   roundf(float x);
 4635     ///
 4636     pure real    roundl(real x);
 4637 
 4638     ///
 4639     c_long  lround(double x);
 4640     ///
 4641     c_long  lroundf(float x);
 4642     ///
 4643     c_long  lroundl(real x);
 4644 
 4645     ///
 4646     long    llround(double x);
 4647     ///
 4648     long    llroundf(float x);
 4649     ///
 4650     long    llroundl(real x);
 4651 
 4652     ///
 4653     pure double  trunc(double x);
 4654     ///
 4655     pure float   truncf(float x);
 4656     ///
 4657     pure real    truncl(real x);
 4658 
 4659     ///
 4660     double  fmod(double x, double y);
 4661     ///
 4662     float   fmodf(float x, float y);
 4663     ///
 4664     real    fmodl(real x, real y);
 4665 
 4666     ///
 4667     double  remainder(double x, double y);
 4668     ///
 4669     float   remainderf(float x, float y);
 4670     ///
 4671     real    remainderl(real x, real y);
 4672 
 4673     ///
 4674     double  remquo(double x, double y, int* quo);
 4675     ///
 4676     float   remquof(float x, float y, int* quo);
 4677     ///
 4678     real    remquol(real x, real y, int* quo);
 4679 
 4680     ///
 4681     pure double  copysign(double x, double y);
 4682     ///
 4683     pure float   copysignf(float x, float y);
 4684     ///
 4685     pure real    copysignl(real x, real y);
 4686 
 4687     ///
 4688     pure double  nan(char* tagp);
 4689     ///
 4690     pure float   nanf(char* tagp);
 4691     ///
 4692     pure real    nanl(char* tagp);
 4693 
 4694     ///
 4695     double  nextafter(double x, double y);
 4696     ///
 4697     float   nextafterf(float x, float y);
 4698     ///
 4699     real    nextafterl(real x, real y);
 4700 
 4701     ///
 4702     double  nexttoward(double x, real y);
 4703     ///
 4704     float   nexttowardf(float x, real y);
 4705     ///
 4706     real    nexttowardl(real x, real y);
 4707 
 4708     ///
 4709     double  fdim(double x, double y);
 4710     ///
 4711     float   fdimf(float x, float y);
 4712     ///
 4713     real    fdiml(real x, real y);
 4714 
 4715     ///
 4716     pure double  fmax(double x, double y);
 4717     ///
 4718     pure float   fmaxf(float x, float y);
 4719     ///
 4720     pure real    fmaxl(real x, real y);
 4721 
 4722     ///
 4723     pure double  fmin(double x, double y);
 4724     ///
 4725     pure float   fminf(float x, float y);
 4726     ///
 4727     pure real    fminl(real x, real y);
 4728 
 4729     ///
 4730     pure double  fma(double x, double y, double z);
 4731     ///
 4732     pure float   fmaf(float x, float y, float z);
 4733     ///
 4734     pure real    fmal(real x, real y, real z);
 4735 }