From c46056122a49aa5789c44aca9567e729d175cbbe Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 18 Jan 2021 18:16:41 +0100 Subject: [PATCH] LibM: Add nextafter() and nexttoward() stubs Only thing missing for Python to build the _math module! :^) --- Userland/Libraries/LibM/math.cpp | 30 ++++++++++++++++++++++++++++++ Userland/Libraries/LibM/math.h | 7 +++++++ 2 files changed, 37 insertions(+) diff --git a/Userland/Libraries/LibM/math.cpp b/Userland/Libraries/LibM/math.cpp index 2c5c86bdcf..6dafbc74b6 100644 --- a/Userland/Libraries/LibM/math.cpp +++ b/Userland/Libraries/LibM/math.cpp @@ -563,4 +563,34 @@ double erfc(double x) NOEXCEPT { return 1 - erf(x); } + +double nextafter(double, double) NOEXCEPT +{ + TODO(); +} + +float nextafterf(float, float) NOEXCEPT +{ + TODO(); +} + +long double nextafterl(long double, long double) NOEXCEPT +{ + TODO(); +} + +double nexttoward(double, long double) NOEXCEPT +{ + TODO(); +} + +float nexttowardf(float, long double) NOEXCEPT +{ + TODO(); +} + +long double nexttowardl(long double, long double) NOEXCEPT +{ + TODO(); +} } diff --git a/Userland/Libraries/LibM/math.h b/Userland/Libraries/LibM/math.h index 8d9b727ddc..74ba8c3e8a 100644 --- a/Userland/Libraries/LibM/math.h +++ b/Userland/Libraries/LibM/math.h @@ -134,4 +134,11 @@ double hypot(double, double) NOEXCEPT; double erf(double) NOEXCEPT; double erfc(double) NOEXCEPT; +double nextafter(double, double) NOEXCEPT; +float nextafterf(float, float) NOEXCEPT; +long double nextafterl(long double, long double) NOEXCEPT; +double nexttoward(double, long double) NOEXCEPT; +float nexttowardf(float, long double) NOEXCEPT; +long double nexttowardl(long double, long double) NOEXCEPT; + __END_DECLS