diff --git a/base/usr/include/math.h b/base/usr/include/math.h index 3f1d6835..2e4968d0 100644 --- a/base/usr/include/math.h +++ b/base/usr/include/math.h @@ -36,6 +36,8 @@ extern double sinh(double x); extern double tan(double x); extern double tanh(double x); extern double atan(double x); +extern double log1p(double x); +extern double expm1(double x); extern double modf(double x, double *iptr); diff --git a/kuroko b/kuroko index 7e96bdee..fa6dbc83 160000 --- a/kuroko +++ b/kuroko @@ -1 +1 @@ -Subproject commit 7e96bdeec1e587a5304c2c8871d88f523df18334 +Subproject commit fa6dbc8365ed442f4fbb619827feb08b93a71e2f diff --git a/libc/math/bad.c b/libc/math/bad.c index 820eb9ec..a42b934b 100644 --- a/libc/math/bad.c +++ b/libc/math/bad.c @@ -1,6 +1,7 @@ /* STUB MATH LIBRARY */ #include #include +#include extern char * _argv_0; #define BAD do { if (getenv("LIBM_DEBUG")) { fprintf(stderr, "%s called bad math function %s\n", _argv_0, __func__); } } while (0) @@ -39,3 +40,12 @@ double log2(double x) { return 0.0; } +double log1p(double x) { + BAD; + return log(x+1.0); +} + +double expm1(double x) { + BAD; + return exp(x) - 1.0; +}