mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 00:31:14 +00:00
LibM: Add long double defines of Math Constants
This commit is contained in:
parent
c74d7adac6
commit
f4072a5038
Notes:
sideshowbarker
2024-07-18 11:06:35 +09:00
Author: https://github.com/Hendiadyoin1 Commit: https://github.com/SerenityOS/serenity/commit/f4072a50389 Pull-request: https://github.com/SerenityOS/serenity/pull/8361 Reviewed-by: https://github.com/awesomekling
|
@ -320,7 +320,7 @@ static FloatT internal_gamma(FloatT x) NOEXCEPT
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stirling approximation
|
// Stirling approximation
|
||||||
return sqrtl(2.0 * M_PI / static_cast<long double>(x)) * powl(static_cast<long double>(x) / M_E, static_cast<long double>(x));
|
return sqrtl(2.0 * M_PIl / static_cast<long double>(x)) * powl(static_cast<long double>(x) / M_El, static_cast<long double>(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -29,6 +29,20 @@ __BEGIN_DECLS
|
||||||
#define NAN __builtin_nan("")
|
#define NAN __builtin_nan("")
|
||||||
#define MAXFLOAT FLT_MAX
|
#define MAXFLOAT FLT_MAX
|
||||||
|
|
||||||
|
#define M_El 2.718281828459045235360287471352662498L
|
||||||
|
#define M_LOG2El 1.442695040888963407359924681001892137L
|
||||||
|
#define M_LOG10El 0.434294481903251827651128918916605082L
|
||||||
|
#define M_LN2l 0.693147180559945309417232121458176568L
|
||||||
|
#define M_LN10l 2.302585092994045684017991454684364208L
|
||||||
|
#define M_PIl 3.141592653589793238462643383279502884L
|
||||||
|
#define M_PI_2l 1.570796326794896619231321691639751442L
|
||||||
|
#define M_PI_4l 0.785398163397448309615660845819875721L
|
||||||
|
#define M_1_PIl 0.318309886183790671537767526745028724L
|
||||||
|
#define M_2_PIl 0.636619772367581343075535053490057448L
|
||||||
|
#define M_2_SQRTPIl 1.128379167095512573896158903121545172L
|
||||||
|
#define M_SQRT2l 1.414213562373095048801688724209698079L
|
||||||
|
#define M_SQRT1_2l 0.707106781186547524400844362104849039L
|
||||||
|
|
||||||
#define M_E 2.7182818284590452354
|
#define M_E 2.7182818284590452354
|
||||||
#define M_LOG2E 1.4426950408889634074
|
#define M_LOG2E 1.4426950408889634074
|
||||||
#define M_LOG10E 0.43429448190325182765
|
#define M_LOG10E 0.43429448190325182765
|
||||||
|
|
Loading…
Reference in a new issue