Allow -c to be specified with -E in cosmocc

This commit is contained in:
Justine Tunney 2024-07-31 02:09:15 -07:00
parent 4ed4a1095a
commit f8cfc89eba
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
10 changed files with 41 additions and 4 deletions

View file

@ -48,7 +48,9 @@ TEST(acoshf, test) {
TEST(acoshl, test) {
volatile long double x = 16;
EXPECT_STREQ("4", gc(xdtoal(sqrtl(x))));
#if LDBL_MANT_DIG > 64
EXPECT_STREQ(".9624236501192069", gc(xdtoal(_acoshl(1.5))));
#endif
EXPECT_STREQ("0", gc(xdtoal(_acoshl(1))));
EXPECT_TRUE(isnan(_acoshl(NAN)));
EXPECT_TRUE(isnan(_acoshl(.5)));

View file

@ -46,8 +46,10 @@ TEST(asinhf, test) {
}
TEST(asinhl, test) {
#if LDBL_MANT_DIG > 64
EXPECT_STREQ(".4812118250596034", gc(xdtoal(_asinhl(+.5))));
EXPECT_STREQ("-.4812118250596034", gc(xdtoal(_asinhl(-.5))));
#endif
EXPECT_STREQ("0", gc(xdtoal(_asinhl(0))));
EXPECT_STREQ("NAN", gc(xdtoal(_asinhl(NAN))));
EXPECT_STREQ("INFINITY", gc(xdtoal(_asinhl(INFINITY))));

View file

@ -99,8 +99,10 @@ TEST(hypotll, test) {
EXPECT_STREQ("1.414213562373095", gc(xdtoal(_hypotl(-1, 1))));
EXPECT_STREQ("1.414213626012708", gc(xdtoal(_hypotl(1.0000001, .99999999))));
EXPECT_STREQ("1.414213626012708", gc(xdtoal(_hypotl(.99999999, 1.0000001))));
#if LDBL_MANT_DIG > 64
EXPECT_STREQ("1.414213562373095e+4931",
gc(xdtoal(_hypotl(1e4931L, 1e4931L))));
#endif
EXPECT_STREQ("NAN", gc(xdtoal(_hypotl(0, NAN))));
EXPECT_STREQ("NAN", gc(xdtoal(_hypotl(NAN, 0))));
EXPECT_STREQ("NAN", gc(xdtoal(_hypotl(NAN, NAN))));