mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 14:22:28 +00:00
Import more Musl math
This commit is contained in:
parent
6d52664aa7
commit
3027d67037
48 changed files with 1749 additions and 180 deletions
|
@ -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"
|
||||
|
||||
|
@ -45,3 +46,12 @@ TEST(log1pf, test) {
|
|||
EXPECT_STREQ("-INFINITY", gc(xdtoaf(log1pf(-1))));
|
||||
EXPECT_STREQ("-NAN", gc(xdtoaf(log1pf(-2))));
|
||||
}
|
||||
|
||||
BENCH(log1p, bench) {
|
||||
double _log1p(double) asm("log1p");
|
||||
float _log1pf(float) asm("log1pf");
|
||||
long double _log1pl(long double) asm("log1pl");
|
||||
EZBENCH2("log1p", donothing, _log1p(.7)); /* ~17ns */
|
||||
EZBENCH2("log1pf", donothing, _log1pf(.7)); /* ~17ns */
|
||||
EZBENCH2("log1pl", donothing, _log1pl(.7)); /* ~28ns */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue