}
TEST(CeillTest, Fractions) {
- EXPECT_FP_EQ(0.0l, __llvm_libc::ceill(0.5l));
+ EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(0.5l));
EXPECT_FP_EQ(-0.0l, __llvm_libc::ceill(-0.5l));
- EXPECT_FP_EQ(0.0l, __llvm_libc::ceill(0.115l));
+ EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(0.115l));
EXPECT_FP_EQ(-0.0l, __llvm_libc::ceill(-0.115l));
- EXPECT_FP_EQ(0.0l, __llvm_libc::ceill(0.715l));
+ EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(0.715l));
EXPECT_FP_EQ(-0.0l, __llvm_libc::ceill(-0.715l));
- EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(1.3l));
+ EXPECT_FP_EQ(2.0l, __llvm_libc::ceill(1.3l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::ceill(-1.3l));
- EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(1.5l));
+ EXPECT_FP_EQ(2.0l, __llvm_libc::ceill(1.5l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::ceill(-1.5l));
- EXPECT_FP_EQ(1.0l, __llvm_libc::ceill(1.75l));
+ EXPECT_FP_EQ(2.0l, __llvm_libc::ceill(1.75l));
EXPECT_FP_EQ(-1.0l, __llvm_libc::ceill(-1.75l));
- EXPECT_FP_EQ(10.0l, __llvm_libc::ceill(10.32l));
+ EXPECT_FP_EQ(11.0l, __llvm_libc::ceill(10.32l));
EXPECT_FP_EQ(-10.0l, __llvm_libc::ceill(-10.32l));
- EXPECT_FP_EQ(10.0l, __llvm_libc::ceill(10.65l));
+ EXPECT_FP_EQ(11.0l, __llvm_libc::ceill(10.65l));
EXPECT_FP_EQ(-10.0l, __llvm_libc::ceill(-10.65l));
- EXPECT_FP_EQ(1234.0l, __llvm_libc::ceill(1234.38l));
+ EXPECT_FP_EQ(1235.0l, __llvm_libc::ceill(1234.38l));
EXPECT_FP_EQ(-1234.0l, __llvm_libc::ceill(-1234.38l));
- EXPECT_FP_EQ(1234.0l, __llvm_libc::ceill(1234.96l));
+ EXPECT_FP_EQ(1235.0l, __llvm_libc::ceill(1234.96l));
EXPECT_FP_EQ(-1234.0l, __llvm_libc::ceill(-1234.96l));
}