Add long double printf formatting support

You can now easily print numbers that have 80 bits of precision. This
change also imports many of the test vectors from the gdtoa codebase.
This commit is contained in:
Justine Tunney 2022-06-14 02:12:32 -07:00
parent dae0583ee5
commit 1c387727fe
9 changed files with 808 additions and 287 deletions

View file

@ -638,9 +638,13 @@ BENCH(palandprintf, bench) {
EZBENCH2("23 %x", donothing, Format("%x", VEIL("r", 23)));
EZBENCH2("23 %d", donothing, Format("%d", VEIL("r", 23)));
EZBENCH2("%f M_PI", donothing, Format("%f", VEIL("x", M_PI)));
EZBENCH2("%Lf M_PI", donothing, Format("%Lf", VEIL("t", M_PI)));
EZBENCH2("%g M_PI", donothing, Format("%g", VEIL("x", M_PI)));
EZBENCH2("%Lg M_PI", donothing, Format("%Lg", VEIL("t", M_PI)));
EZBENCH2("%a M_PI", donothing, Format("%a", VEIL("x", M_PI)));
EZBENCH2("%La M_PI", donothing, Format("%La", VEIL("t", M_PI)));
EZBENCH2("%e M_PI", donothing, Format("%e", VEIL("x", M_PI)));
EZBENCH2("%Le M_PI", donothing, Format("%Le", VEIL("t", M_PI)));
EZBENCH2("ULONG_MAX %lo", donothing, Format("%lo", VEIL("r", ULONG_MAX)));
EZBENCH2("INT_MIN %x", donothing, Format("%x", VEIL("r", INT_MIN)));
EZBENCH2("INT_MIN %d", donothing, Format("%d", VEIL("r", INT_MIN)));