Skip to content

Commit 221a492

Browse files
committed
Merge branch 'main' of github.com:fastfloat/fast_float
2 parents a110aa1 + 8d9f627 commit 221a492

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/basictest.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,9 @@ TEST_CASE("double.general") {
11671167
// DBL_TRUE_MIN / 2 + 0.0000000000000001e-324
11681168
verify("2.4703282292062328e-324", 0x0.0000000000001p-1022);
11691169

1170+
verify("0.2470328229206232720e-323", 0.0, std::errc::result_out_of_range);
1171+
verify("0.2470328229206232721e-323", 0x0.0000000000001p-1022);
1172+
11701173
verify("-2.2222222222223e-322", -0x1.68p-1069);
11711174
verify("9007199254740993.0", 0x1p+53);
11721175
verify("860228122.6654514319E+90", 0x1.92bb20990715fp+328);
@@ -1262,8 +1265,13 @@ TEST_CASE("double.general") {
12621265
verify("4.9406564584124654e-324", 0x0.0000000000001p-1022);
12631266
verify("2.2250738585072009e-308", 0x0.fffffffffffffp-1022);
12641267
verify("2.2250738585072014e-308", 0x1p-1022);
1268+
verify("0.2225073858507201136e-307", 0x0.fffffffffffffp-1022);
1269+
verify("0.2225073858507201137e-307", 0x1p-1022);
12651270
verify("1.7976931348623157e308", 0x1.fffffffffffffp+1023);
12661271
verify("1.7976931348623158e308", 0x1.fffffffffffffp+1023);
1272+
verify("1.7976931348623158079e308", std::numeric_limits<double>::max());
1273+
verify("1.7976931348623158080e308", std::numeric_limits<double>::infinity(),
1274+
std::errc::result_out_of_range);
12671275
verify("4503599627370496.5", 4503599627370496.5);
12681276
verify("4503599627475352.5", 4503599627475352.5);
12691277
verify("4503599627475353.5", 4503599627475353.5);
@@ -1543,6 +1551,8 @@ TEST_CASE("float.general") {
15431551
verify("0.7006492e-45", 0.f, std::errc::result_out_of_range);
15441552
// FLT_TRUE_MIN / 2 + 0.0000001e-45
15451553
verify("0.7006493e-45", 0x1p-149f);
1554+
verify("0.7006492321624085354e-45", 0.f, std::errc::result_out_of_range);
1555+
verify("0.7006492321624085355e-45", 0x1p-149f);
15461556

15471557
// max
15481558
verify("340282346638528859811704183484516925440", 0x1.fffffep+127f);
@@ -1553,6 +1563,9 @@ TEST_CASE("float.general") {
15531563
// that rounds to FLT_MAX
15541564
verify("340282356779733661637539395458142568447",
15551565
std::numeric_limits<float>::max());
1566+
verify("0.3402823567797336616e39", std::numeric_limits<float>::max());
1567+
verify("0.3402823567797336617e39", std::numeric_limits<float>::infinity(),
1568+
std::errc::result_out_of_range);
15561569

15571570
verify("-1e-999", -0.0f, std::errc::result_out_of_range);
15581571
verify("1."
@@ -1563,6 +1576,8 @@ TEST_CASE("float.general") {
15631576
"175494140627517859246175898662808184331245864732796240031385942718174"
15641577
"6759860647699724722770042717456817626953125e-38",
15651578
0x1.fffff8p-127f);
1579+
verify("1.1754942807573642917e-38", 0x1.fffffcp-127f);
1580+
verify("1.1754942807573642918e-38", std::numeric_limits<float>::min());
15661581
verify_runtime(
15671582
append_zeros("1."
15681583
"17549414062751785924617589866280818433124586473279624003138"

0 commit comments

Comments
 (0)