ASSERT_EQ(FP_NORMAL, fpclassify(1.0f));
ASSERT_EQ(FP_NORMAL, fpclassify(1.0));
- ASSERT_EQ(FP_NORMAL, fpclassify(1.0l));
+ ASSERT_EQ(FP_NORMAL, fpclassify(1.0L));
ASSERT_EQ(FP_SUBNORMAL, fpclassify(float_subnormal()));
ASSERT_EQ(FP_SUBNORMAL, fpclassify(double_subnormal()));
ASSERT_EQ(FP_ZERO, fpclassify(0.0f));
ASSERT_EQ(FP_ZERO, fpclassify(0.0));
- ASSERT_EQ(FP_ZERO, fpclassify(0.0l));
+ ASSERT_EQ(FP_ZERO, fpclassify(0.0L));
}
TEST(math, isfinite) {
ASSERT_TRUE(test_capture_isfinite(123.0f));
ASSERT_TRUE(test_capture_isfinite(123.0));
- ASSERT_TRUE(test_capture_isfinite(123.0l));
+ ASSERT_TRUE(test_capture_isfinite(123.0L));
ASSERT_FALSE(test_capture_isfinite(HUGE_VALF));
ASSERT_FALSE(test_capture_isfinite(HUGE_VAL));
ASSERT_FALSE(test_capture_isfinite(HUGE_VALL));
TEST(math, isinf) {
ASSERT_FALSE(test_capture_isinf(123.0f));
ASSERT_FALSE(test_capture_isinf(123.0));
- ASSERT_FALSE(test_capture_isinf(123.0l));
+ ASSERT_FALSE(test_capture_isinf(123.0L));
ASSERT_TRUE(test_capture_isinf(HUGE_VALF));
ASSERT_TRUE(test_capture_isinf(HUGE_VAL));
ASSERT_TRUE(test_capture_isinf(HUGE_VALL));
TEST(math, isnan) {
ASSERT_FALSE(test_capture_isnan(123.0f));
ASSERT_FALSE(test_capture_isnan(123.0));
- ASSERT_FALSE(test_capture_isnan(123.0l));
+ ASSERT_FALSE(test_capture_isnan(123.0L));
ASSERT_TRUE(test_capture_isnan(nanf("")));
ASSERT_TRUE(test_capture_isnan(nan("")));
ASSERT_TRUE(test_capture_isnan(nanl("")));
TEST(math, isnormal) {
ASSERT_TRUE(isnormal(123.0f));
ASSERT_TRUE(isnormal(123.0));
- ASSERT_TRUE(isnormal(123.0l));
+ ASSERT_TRUE(isnormal(123.0L));
ASSERT_FALSE(isnormal(float_subnormal()));
ASSERT_FALSE(isnormal(double_subnormal()));
ASSERT_FALSE(isnormal(ldouble_subnormal()));
TEST(math, signbit) {
ASSERT_EQ(0, test_capture_signbit(0.0f));
ASSERT_EQ(0, test_capture_signbit(0.0));
- ASSERT_EQ(0, test_capture_signbit(0.0l));
+ ASSERT_EQ(0, test_capture_signbit(0.0L));
ASSERT_EQ(0, test_capture_signbit(1.0f));
ASSERT_EQ(0, test_capture_signbit(1.0));
- ASSERT_EQ(0, test_capture_signbit(1.0l));
+ ASSERT_EQ(0, test_capture_signbit(1.0L));
ASSERT_NE(0, test_capture_signbit(-1.0f));
ASSERT_NE(0, test_capture_signbit(-1.0));
- ASSERT_NE(0, test_capture_signbit(-1.0l));
+ ASSERT_NE(0, test_capture_signbit(-1.0L));
}
TEST(math, __fpclassifyd) {
#if defined(__BIONIC__)
EXPECT_EQ(FP_INFINITE, __fpclassifyl(HUGE_VALL));
EXPECT_EQ(FP_NAN, __fpclassifyl(nanl("")));
- EXPECT_EQ(FP_NORMAL, __fpclassifyl(1.0l));
+ EXPECT_EQ(FP_NORMAL, __fpclassifyl(1.0L));
EXPECT_EQ(FP_SUBNORMAL, __fpclassifyl(ldouble_subnormal()));
- EXPECT_EQ(FP_ZERO, __fpclassifyl(0.0l));
+ EXPECT_EQ(FP_ZERO, __fpclassifyl(0.0L));
#else // __BIONIC__
GTEST_LOG_(INFO) << "This test does nothing.\n";
#endif // __BIONIC__
TEST(math, __isfinitel) {
#if defined(__BIONIC__)
- ASSERT_TRUE(__isfinitel(123.0l));
+ ASSERT_TRUE(__isfinitel(123.0L));
ASSERT_FALSE(__isfinitel(HUGE_VALL));
#else // __BIONIC__
GTEST_LOG_(INFO) << "This test does nothing.\n";
}
TEST(math, __isinfl) {
- ASSERT_FALSE(__isinfl(123.0l));
+ ASSERT_FALSE(__isinfl(123.0L));
ASSERT_TRUE(__isinfl(HUGE_VALL));
}
}
TEST(math, __isnanl) {
- ASSERT_FALSE(__isnanl(123.0l));
+ ASSERT_FALSE(__isnanl(123.0L));
ASSERT_TRUE(__isnanl(nanl("")));
}
TEST(math, __isnormall) {
#if defined(__BIONIC__)
- ASSERT_TRUE(__isnormall(123.0l));
+ ASSERT_TRUE(__isnormall(123.0L));
ASSERT_FALSE(__isnormall(ldouble_subnormal()));
#else // __BIONIC__
GTEST_LOG_(INFO) << "This test does nothing.\n";
}
TEST(math, __signbitl) {
- ASSERT_EQ(0l, __signbitl(0.0l));
- ASSERT_EQ(0l, __signbitl(1.0l));
- ASSERT_NE(0l, __signbitl(-1.0l));
+ ASSERT_EQ(0L, __signbitl(0.0L));
+ ASSERT_EQ(0L, __signbitl(1.0L));
+ ASSERT_NE(0L, __signbitl(-1.0L));
}
TEST(math, acos) {
}
TEST(math, acosl) {
- ASSERT_DOUBLE_EQ(M_PI/2.0l, acosl(0.0l));
+ ASSERT_DOUBLE_EQ(M_PI/2.0L, acosl(0.0L));
}
TEST(math, asin) {
}
TEST(math, asinl) {
- ASSERT_DOUBLE_EQ(0.0l, asinl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, asinl(0.0L));
}
TEST(math, atan) {
}
TEST(math, atanl) {
- ASSERT_DOUBLE_EQ(0.0l, atanl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, atanl(0.0L));
}
TEST(math, atan2) {
}
TEST(math, atan2l) {
- ASSERT_DOUBLE_EQ(0.0l, atan2l(0.0l, 0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, atan2l(0.0L, 0.0L));
}
TEST(math, cos) {
}
TEST(math, cosl) {
- ASSERT_DOUBLE_EQ(1.0l, cosl(0.0l));
+ ASSERT_DOUBLE_EQ(1.0L, cosl(0.0L));
}
TEST(math, sin) {
- ASSERT_FLOAT_EQ(0.0, sin(0.0));
+ ASSERT_DOUBLE_EQ(0.0, sin(0.0));
}
TEST(math, sinf) {
}
TEST(math, sinl) {
- ASSERT_DOUBLE_EQ(0.0l, sinl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, sinl(0.0L));
}
TEST(math, tan) {
}
TEST(math, tanl) {
- ASSERT_DOUBLE_EQ(0.0l, tanl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, tanl(0.0L));
}
TEST(math, acosh) {
}
TEST(math, acoshl) {
- ASSERT_DOUBLE_EQ(0.0l, acoshl(1.0l));
+ ASSERT_DOUBLE_EQ(0.0L, acoshl(1.0L));
}
TEST(math, asinh) {
}
TEST(math, asinhl) {
- ASSERT_DOUBLE_EQ(0.0l, asinhl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, asinhl(0.0L));
}
TEST(math, atanh) {
}
TEST(math, atanhl) {
- ASSERT_DOUBLE_EQ(0.0l, atanhl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, atanhl(0.0L));
}
TEST(math, cosh) {
}
TEST(math, coshl) {
- ASSERT_DOUBLE_EQ(1.0l, coshl(0.0l));
+ ASSERT_DOUBLE_EQ(1.0L, coshl(0.0L));
}
TEST(math, sinh) {
}
TEST(math, sinhl) {
- ASSERT_DOUBLE_EQ(0.0l, sinhl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, sinhl(0.0L));
}
TEST(math, tanh) {
}
TEST(math, tanhl) {
- ASSERT_DOUBLE_EQ(0.0l, tanhl(0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, tanhl(0.0L));
}
TEST(math, log) {
}
TEST(math, logl) {
- ASSERT_DOUBLE_EQ(1.0l, logl(M_E));
+ ASSERT_DOUBLE_EQ(1.0L, logl(M_E));
}
TEST(math, log2) {
}
TEST(math, log2l) {
- ASSERT_DOUBLE_EQ(12.0l, log2l(4096.0l));
+ ASSERT_DOUBLE_EQ(12.0L, log2l(4096.0L));
}
TEST(math, log10) {
}
TEST(math, log10l) {
- ASSERT_DOUBLE_EQ(3.0l, log10l(1000.0l));
+ ASSERT_DOUBLE_EQ(3.0L, log10l(1000.0L));
}
TEST(math, cbrt) {
}
TEST(math, cbrtl) {
- ASSERT_DOUBLE_EQ(3.0l, cbrtl(27.0l));
+ ASSERT_DOUBLE_EQ(3.0L, cbrtl(27.0L));
}
TEST(math, sqrt) {
}
TEST(math, sqrtl) {
- ASSERT_DOUBLE_EQ(2.0l, sqrtl(4.0l));
+ ASSERT_DOUBLE_EQ(2.0L, sqrtl(4.0L));
}
TEST(math, exp) {
}
TEST(math, expl) {
- ASSERT_DOUBLE_EQ(1.0l, expl(0.0l));
- ASSERT_DOUBLE_EQ(M_E, expl(1.0l));
+ ASSERT_DOUBLE_EQ(1.0L, expl(0.0L));
+ ASSERT_DOUBLE_EQ(M_E, expl(1.0L));
}
TEST(math, exp2) {
}
TEST(math, exp2l) {
- ASSERT_DOUBLE_EQ(8.0l, exp2l(3.0l));
+ ASSERT_DOUBLE_EQ(8.0L, exp2l(3.0L));
}
TEST(math, expm1) {
}
TEST(math, expm1l) {
- ASSERT_DOUBLE_EQ(M_E - 1.0l, expm1l(1.0l));
+ ASSERT_DOUBLE_EQ(M_E - 1.0L, expm1l(1.0L));
}
TEST(math, pow) {
}
TEST(math, powl) {
- ASSERT_TRUE(__isnanl(powl(nanl(""), 3.0l)));
- ASSERT_DOUBLE_EQ(1.0l, (powl(1.0l, nanl(""))));
- ASSERT_TRUE(__isnanl(powl(2.0l, nanl(""))));
- ASSERT_DOUBLE_EQ(8.0l, powl(2.0l, 3.0l));
+ ASSERT_TRUE(__isnanl(powl(nanl(""), 3.0L)));
+ ASSERT_DOUBLE_EQ(1.0L, (powl(1.0L, nanl(""))));
+ ASSERT_TRUE(__isnanl(powl(2.0L, nanl(""))));
+ ASSERT_DOUBLE_EQ(8.0L, powl(2.0L, 3.0L));
}
TEST(math, ceil) {
}
TEST(math, ceill) {
- ASSERT_DOUBLE_EQ(1.0, ceill(0.9l));
+ ASSERT_DOUBLE_EQ(1.0L, ceill(0.9L));
}
TEST(math, floor) {
}
TEST(math, floorl) {
- ASSERT_DOUBLE_EQ(1.0l, floorl(1.1l));
+ ASSERT_DOUBLE_EQ(1.0L, floorl(1.1L));
}
TEST(math, fabs) {
}
TEST(math, fabsl) {
- ASSERT_DOUBLE_EQ(1.0l, fabsl(-1.0l));
+ ASSERT_DOUBLE_EQ(1.0L, fabsl(-1.0L));
}
TEST(math, ldexp) {
}
TEST(math, ldexpl) {
- ASSERT_DOUBLE_EQ(16.0l, ldexpl(2.0l, 3.0));
+ ASSERT_DOUBLE_EQ(16.0L, ldexpl(2.0L, 3.0));
}
TEST(math, fmod) {
}
TEST(math, fmodl) {
- ASSERT_DOUBLE_EQ(2.0l, fmodl(12.0l, 10.0l));
+ ASSERT_DOUBLE_EQ(2.0L, fmodl(12.0L, 10.0L));
}
TEST(math, remainder) {
}
TEST(math, remainderl) {
- ASSERT_DOUBLE_EQ(2.0l, remainderl(12.0l, 10.0l));
+ ASSERT_DOUBLE_EQ(2.0L, remainderl(12.0L, 10.0L));
}
TEST(math, drem) {
}
TEST(math, fmaxl) {
- ASSERT_DOUBLE_EQ(12.0l, fmaxl(12.0l, 10.0l));
- ASSERT_DOUBLE_EQ(12.0l, fmaxl(12.0l, nanl("")));
- ASSERT_DOUBLE_EQ(12.0l, fmaxl(nanl(""), 12.0l));
+ ASSERT_DOUBLE_EQ(12.0L, fmaxl(12.0L, 10.0L));
+ ASSERT_DOUBLE_EQ(12.0L, fmaxl(12.0L, nanl("")));
+ ASSERT_DOUBLE_EQ(12.0L, fmaxl(nanl(""), 12.0L));
}
TEST(math, fmin) {
}
TEST(math, fminl) {
- ASSERT_DOUBLE_EQ(10.0l, fminl(12.0l, 10.0l));
- ASSERT_DOUBLE_EQ(12.0l, fminl(12.0l, nanl("")));
- ASSERT_DOUBLE_EQ(12.0l, fminl(nanl(""), 12.0l));
+ ASSERT_DOUBLE_EQ(10.0L, fminl(12.0L, 10.0L));
+ ASSERT_DOUBLE_EQ(12.0L, fminl(12.0L, nanl("")));
+ ASSERT_DOUBLE_EQ(12.0L, fminl(nanl(""), 12.0L));
}
TEST(math, fma) {
}
TEST(math, fmal) {
- ASSERT_DOUBLE_EQ(10.0l, fmal(2.0l, 3.0l, 4.0l));
+ ASSERT_DOUBLE_EQ(10.0L, fmal(2.0L, 3.0L, 4.0L));
}
TEST(math, hypot) {
}
TEST(math, hypotl) {
- ASSERT_DOUBLE_EQ(5.0l, hypotl(3.0l, 4.0l));
+ ASSERT_DOUBLE_EQ(5.0L, hypotl(3.0L, 4.0L));
}
TEST(math, erf) {
}
TEST(math, erfl) {
- ASSERT_DOUBLE_EQ(0.84270079294971489l, erfl(1.0l));
+ ASSERT_DOUBLE_EQ(0.84270079294971489L, erfl(1.0L));
}
TEST(math, erfc) {
}
TEST(math, erfcl) {
- ASSERT_DOUBLE_EQ(0.15729920705028513l, erfcl(1.0l));
+ ASSERT_DOUBLE_EQ(0.15729920705028513l, erfcl(1.0L));
}
TEST(math, lrint) {
fesetround(FE_UPWARD); // lrint/lrintf/lrintl obey the rounding mode.
ASSERT_EQ(1235, lrint(1234.01));
ASSERT_EQ(1235, lrintf(1234.01f));
- ASSERT_EQ(1235, lrintl(1234.01l));
+ ASSERT_EQ(1235, lrintl(1234.01L));
fesetround(FE_TOWARDZERO); // lrint/lrintf/lrintl obey the rounding mode.
ASSERT_EQ(1234, lrint(1234.01));
ASSERT_EQ(1234, lrintf(1234.01f));
- ASSERT_EQ(1234, lrintl(1234.01l));
+ ASSERT_EQ(1234, lrintl(1234.01L));
fesetround(FE_UPWARD); // llrint/llrintf/llrintl obey the rounding mode.
ASSERT_EQ(1235L, llrint(1234.01));
ASSERT_EQ(1235L, llrintf(1234.01f));
- ASSERT_EQ(1235L, llrintl(1234.01l));
+ ASSERT_EQ(1235L, llrintl(1234.01L));
fesetround(FE_TOWARDZERO); // llrint/llrintf/llrintl obey the rounding mode.
ASSERT_EQ(1234L, llrint(1234.01));
ASSERT_EQ(1234L, llrintf(1234.01f));
- ASSERT_EQ(1234L, llrintl(1234.01l));
+ ASSERT_EQ(1234L, llrintl(1234.01L));
}
TEST(math, rint) {
ASSERT_TRUE((fetestexcept(FE_ALL_EXCEPT) & FE_INEXACT) != 0);
feclearexcept(FE_ALL_EXCEPT); // rint/rintf/rintl do set the FE_INEXACT flag.
- ASSERT_EQ(1234.0, rintl(1234.0l));
+ ASSERT_EQ(1234.0, rintl(1234.0L));
ASSERT_TRUE((fetestexcept(FE_ALL_EXCEPT) & FE_INEXACT) == 0);
- ASSERT_EQ(1235.0, rintl(1234.01l));
+ ASSERT_EQ(1235.0, rintl(1234.01L));
ASSERT_TRUE((fetestexcept(FE_ALL_EXCEPT) & FE_INEXACT) != 0);
fesetround(FE_TOWARDZERO); // rint/rintf obey the rounding mode.
ASSERT_EQ(1234.0, rint(1234.01));
ASSERT_EQ(1234.0f, rintf(1234.01f));
- ASSERT_EQ(1234.0, rintl(1234.01l));
+ ASSERT_EQ(1234.0, rintl(1234.01L));
}
TEST(math, nearbyint) {
ASSERT_TRUE((fetestexcept(FE_ALL_EXCEPT) & FE_INEXACT) == 0);
feclearexcept(FE_ALL_EXCEPT); // nearbyint/nearbyintf/nearbyintl don't set the FE_INEXACT flag.
- ASSERT_EQ(1234.0, nearbyintl(1234.0l));
+ ASSERT_EQ(1234.0, nearbyintl(1234.0L));
ASSERT_TRUE((fetestexcept(FE_ALL_EXCEPT) & FE_INEXACT) == 0);
- ASSERT_EQ(1235.0, nearbyintl(1234.01l));
+ ASSERT_EQ(1235.0, nearbyintl(1234.01L));
ASSERT_TRUE((fetestexcept(FE_ALL_EXCEPT) & FE_INEXACT) == 0);
fesetround(FE_TOWARDZERO); // nearbyint/nearbyintf/nearbyintl obey the rounding mode.
ASSERT_EQ(1234.0, nearbyint(1234.01));
ASSERT_EQ(1234.0f, nearbyintf(1234.01f));
- ASSERT_EQ(1234.0, nearbyintl(1234.01l));
+ ASSERT_EQ(1234.0, nearbyintl(1234.01L));
}
TEST(math, lround) {
fesetround(FE_UPWARD); // lround ignores the rounding mode.
ASSERT_EQ(1234, lround(1234.01));
ASSERT_EQ(1234, lroundf(1234.01f));
- ASSERT_EQ(1234, lroundl(1234.01l));
+ ASSERT_EQ(1234, lroundl(1234.01L));
}
TEST(math, llround) {
fesetround(FE_UPWARD); // llround ignores the rounding mode.
ASSERT_EQ(1234L, llround(1234.01));
ASSERT_EQ(1234L, llroundf(1234.01f));
- ASSERT_EQ(1234L, llroundl(1234.01l));
+ ASSERT_EQ(1234L, llroundl(1234.01L));
}
TEST(math, ilogb) {
}
TEST(math, ilogbl) {
- ASSERT_EQ(FP_ILOGB0, ilogbl(0.0l));
+ ASSERT_EQ(FP_ILOGB0, ilogbl(0.0L));
ASSERT_EQ(FP_ILOGBNAN, ilogbl(nanl("")));
ASSERT_EQ(INT_MAX, ilogbl(HUGE_VALL));
- ASSERT_EQ(0l, ilogbl(1.0l));
- ASSERT_EQ(3l, ilogbl(10.0l));
+ ASSERT_EQ(0L, ilogbl(1.0L));
+ ASSERT_EQ(3L, ilogbl(10.0L));
}
TEST(math, logb) {
}
TEST(math, logbl) {
- ASSERT_EQ(-HUGE_VAL, logbl(0.0l));
+ ASSERT_EQ(-HUGE_VAL, logbl(0.0L));
ASSERT_TRUE(isnan(logbl(nanl(""))));
ASSERT_TRUE(isinf(logbl(HUGE_VALL)));
- ASSERT_EQ(0.0l, logbl(1.0l));
- ASSERT_EQ(3.0l, logbl(10.0l));
+ ASSERT_EQ(0.0L, logbl(1.0L));
+ ASSERT_EQ(3.0L, logbl(10.0L));
}
TEST(math, log1p) {
}
TEST(math, log1pl) {
- ASSERT_EQ(-HUGE_VALL, log1pl(-1.0l));
+ ASSERT_EQ(-HUGE_VALL, log1pl(-1.0L));
ASSERT_TRUE(isnan(log1pl(nanl(""))));
ASSERT_TRUE(isinf(log1pl(HUGE_VALL)));
- ASSERT_DOUBLE_EQ(1.0l, log1pl(M_E - 1.0l));
+ ASSERT_DOUBLE_EQ(1.0L, log1pl(M_E - 1.0L));
}
TEST(math, fdim) {
}
TEST(math, fdiml) {
- ASSERT_DOUBLE_EQ(0.0l, fdiml(1.0l, 1.0l));
- ASSERT_DOUBLE_EQ(1.0l, fdiml(2.0l, 1.0l));
- ASSERT_DOUBLE_EQ(0.0l, fdiml(1.0l, 2.0l));
+ ASSERT_DOUBLE_EQ(0.0L, fdiml(1.0L, 1.0L));
+ ASSERT_DOUBLE_EQ(1.0L, fdiml(2.0L, 1.0L));
+ ASSERT_DOUBLE_EQ(0.0L, fdiml(1.0L, 2.0L));
}
TEST(math, round) {
TEST(math, roundl) {
fesetround(FE_TOWARDZERO); // roundl ignores the rounding mode and always rounds away from zero.
- ASSERT_DOUBLE_EQ(1.0l, roundl(0.5l));
- ASSERT_DOUBLE_EQ(-1.0l, roundl(-0.5l));
- ASSERT_DOUBLE_EQ(0.0l, roundl(0.0l));
- ASSERT_DOUBLE_EQ(-0.0l, roundl(-0.0l));
+ ASSERT_DOUBLE_EQ(1.0L, roundl(0.5L));
+ ASSERT_DOUBLE_EQ(-1.0L, roundl(-0.5L));
+ ASSERT_DOUBLE_EQ(0.0L, roundl(0.0L));
+ ASSERT_DOUBLE_EQ(-0.0L, roundl(-0.0L));
ASSERT_TRUE(isnan(roundl(nanl(""))));
ASSERT_DOUBLE_EQ(HUGE_VALL, roundl(HUGE_VALL));
}
TEST(math, truncl) {
fesetround(FE_UPWARD); // truncl ignores the rounding mode and always rounds toward zero.
- ASSERT_DOUBLE_EQ(1.0l, truncl(1.5l));
- ASSERT_DOUBLE_EQ(-1.0l, truncl(-1.5l));
- ASSERT_DOUBLE_EQ(0.0l, truncl(0.0l));
- ASSERT_DOUBLE_EQ(-0.0l, truncl(-0.0l));
+ ASSERT_DOUBLE_EQ(1.0L, truncl(1.5L));
+ ASSERT_DOUBLE_EQ(-1.0L, truncl(-1.5L));
+ ASSERT_DOUBLE_EQ(0.0L, truncl(0.0L));
+ ASSERT_DOUBLE_EQ(-0.0L, truncl(-0.0L));
ASSERT_TRUE(isnan(truncl(nan(""))));
ASSERT_DOUBLE_EQ(HUGE_VALL, truncl(HUGE_VALL));
}
}
TEST(math, nextafterl) {
- ASSERT_DOUBLE_EQ(0.0l, nextafterl(0.0l, 0.0l));
+ ASSERT_DOUBLE_EQ(0.0L, nextafterl(0.0L, 0.0L));
// Use a runtime value to accomodate the case when
// sizeof(double) == sizeof(long double)
- long double smallest_positive = ldexpl(1.0l, LDBL_MIN_EXP - LDBL_MANT_DIG);
- ASSERT_DOUBLE_EQ(smallest_positive, nextafterl(0.0l, 1.0l));
- ASSERT_DOUBLE_EQ(0.0l, nextafterl(0.0l, -1.0l));
+ long double smallest_positive = ldexpl(1.0L, LDBL_MIN_EXP - LDBL_MANT_DIG);
+ ASSERT_DOUBLE_EQ(smallest_positive, nextafterl(0.0L, 1.0L));
+ ASSERT_DOUBLE_EQ(0.0L, nextafterl(0.0L, -1.0L));
}
// TODO: nexttoward
}
TEST(math, copysignl) {
- ASSERT_DOUBLE_EQ(0.0l, copysignl(0.0l, 1.0l));
- ASSERT_DOUBLE_EQ(-0.0l, copysignl(0.0l, -1.0l));
- ASSERT_DOUBLE_EQ(2.0l, copysignl(2.0l, 1.0l));
- ASSERT_DOUBLE_EQ(-2.0l, copysignl(2.0l, -1.0l));
+ ASSERT_DOUBLE_EQ(0.0L, copysignl(0.0L, 1.0L));
+ ASSERT_DOUBLE_EQ(-0.0L, copysignl(0.0L, -1.0L));
+ ASSERT_DOUBLE_EQ(2.0L, copysignl(2.0L, 1.0L));
+ ASSERT_DOUBLE_EQ(-2.0L, copysignl(2.0L, -1.0L));
}
TEST(math, significand) {
extern "C" long double significandl(long double); // BSD's <math.h> doesn't declare this.
TEST(math, significandl) {
- ASSERT_DOUBLE_EQ(0.0l, significandl(0.0l));
- ASSERT_DOUBLE_EQ(1.2l, significandl(1.2l));
- ASSERT_DOUBLE_EQ(1.5375l, significandl(12.3l));
+ ASSERT_DOUBLE_EQ(0.0L, significandl(0.0L));
+ ASSERT_DOUBLE_EQ(1.2L, significandl(1.2L));
+ ASSERT_DOUBLE_EQ(1.5375L, significandl(12.3L));
}
TEST(math, scalb) {
}
TEST(math, scalblnl) {
- ASSERT_DOUBLE_EQ(12.0l, scalblnl(3.0l, 2L));
+ ASSERT_DOUBLE_EQ(12.0L, scalblnl(3.0L, 2L));
}
TEST(math, scalbn) {
}
TEST(math, scalbnl) {
- ASSERT_DOUBLE_EQ(12.0l, scalbnl(3.0l, 2));
+ ASSERT_DOUBLE_EQ(12.0L, scalbnl(3.0L, 2));
}
TEST(math, gamma) {
}
TEST(math, lgammal) {
- ASSERT_DOUBLE_EQ(logl(24.0l), lgammal(5.0l));
+ ASSERT_DOUBLE_EQ(logl(24.0L), lgammal(5.0L));
}
TEST(math, lgamma_r) {
}
TEST(math, tgammal) {
- ASSERT_DOUBLE_EQ(24.0l, tgammal(5.0l));
+ ASSERT_DOUBLE_EQ(24.0L, tgammal(5.0L));
}
TEST(math, j0) {
TEST(math, frexpl) {
int exp;
- long double ldr = frexpl(1024.0l, &exp);
- ASSERT_DOUBLE_EQ(1024.0l, scalbnl(ldr, exp));
+ long double ldr = frexpl(1024.0L, &exp);
+ ASSERT_DOUBLE_EQ(1024.0L, scalbnl(ldr, exp));
}
TEST(math, modf) {
TEST(math, remquol) {
int q;
- long double ld = remquol(13.0l, 4.0l, &q);
- ASSERT_DOUBLE_EQ(3l, q);
- ASSERT_DOUBLE_EQ(1.0l, ld);
+ long double ld = remquol(13.0L, 4.0L, &q);
+ ASSERT_DOUBLE_EQ(3L, q);
+ ASSERT_DOUBLE_EQ(1.0L, ld);
}
// https://code.google.com/p/android/issues/detail?id=6697