diff --git a/Libraries/LibM/math.cpp b/Libraries/LibM/math.cpp index 33e05047fe..f1de325ebd 100644 --- a/Libraries/LibM/math.cpp +++ b/Libraries/LibM/math.cpp @@ -279,6 +279,16 @@ float expf(float exponent) return (float)exp(exponent); } +double exp2(double exponent) +{ + return pow(2.0, exponent); +} + +float exp2f(float exponent) +{ + return pow(2.0f, exponent); +} + double cosh(double x) { double exponentiated = exp(-x); diff --git a/Libraries/LibM/math.h b/Libraries/LibM/math.h index ed738b356b..c8177fded8 100644 --- a/Libraries/LibM/math.h +++ b/Libraries/LibM/math.h @@ -74,6 +74,8 @@ double fmod(double, double); float fmodf(float, float); double exp(double); float expf(float); +double exp2(double); +float exp2f(float); double frexp(double, int* exp); float frexpf(float, int* exp); double log(double);