Get more Python tests passing (#141)

This commit is contained in:
Justine Tunney 2021-08-16 15:26:31 -07:00
parent 916f19eea1
commit 59e1c245d1
141 changed files with 3536 additions and 1203 deletions

View file

@ -18,6 +18,7 @@
*/
#include "libc/math.h"
#include "libc/runtime/gc.internal.h"
#include "libc/testlib/ezbench.h"
#include "libc/testlib/testlib.h"
#include "libc/x/x.h"
@ -34,6 +35,8 @@ TEST(atanh, test) {
EXPECT_STREQ("-INFINITY", gc(xdtoa(atanh(-1))));
EXPECT_TRUE(isnan(atanh(+1.1)));
EXPECT_TRUE(isnan(atanh(-1.1)));
EXPECT_STREQ("-2.1073424255447e-08",
gc(xasprintf("%.15g", atanh(-2.1073424255447e-08))));
}
TEST(atanhl, test) {
@ -57,3 +60,10 @@ TEST(atanhf, test) {
EXPECT_TRUE(isnan(atanhf(+1.1)));
EXPECT_TRUE(isnan(atanhf(-1.1)));
}
BENCH(atanh, bench) {
volatile double a = .5;
EZBENCH2("atanhf", donothing, EXPROPRIATE(atanhf(a)));
EZBENCH2("atanh", donothing, EXPROPRIATE(atanh(a)));
EZBENCH2("atanhl", donothing, EXPROPRIATE(atanhl(a)));
}