1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge remote-tracking branch 'upstream/3.4' into merge-3.4

This commit is contained in:
Alexander Alekhin
2023-01-21 18:19:39 +00:00
74 changed files with 249 additions and 228 deletions
+14
View File
@@ -3992,6 +3992,13 @@ TEST(Core_FastMath, InlineNaN)
EXPECT_EQ( cvIsNaN((double) NAN), 1);
EXPECT_EQ( cvIsNaN((double) -NAN), 1);
EXPECT_EQ( cvIsNaN(0.0), 0);
// Regression: check the +/-Inf cases
Cv64suf suf;
suf.u = 0x7FF0000000000000UL;
EXPECT_EQ( cvIsNaN(suf.f), 0);
suf.u = 0xFFF0000000000000UL;
EXPECT_EQ( cvIsNaN(suf.f), 0);
}
TEST(Core_FastMath, InlineIsInf)
@@ -4003,6 +4010,13 @@ TEST(Core_FastMath, InlineIsInf)
EXPECT_EQ( cvIsInf((double) HUGE_VAL), 1);
EXPECT_EQ( cvIsInf((double) -HUGE_VAL), 1);
EXPECT_EQ( cvIsInf(0.0), 0);
// Regression: check the cases of 0x7FF00000xxxxxxxx
Cv64suf suf;
suf.u = 0x7FF0000000000001UL;
EXPECT_EQ( cvIsInf(suf.f), 0);
suf.u = 0x7FF0000012345678UL;
EXPECT_EQ( cvIsInf(suf.f), 0);
}
}} // namespace