mirror of
https://github.com/fastfloat/fast_float.git
synced 2026-05-01 03:19:21 +08:00
Merge branch 'fastfloat:main' into main
This commit is contained in:
commit
a2774ae899
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Ideally, you should provide a reproducible test case.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
**Note:** Bug reports should come with a test case or, at least, an analysis.
|
||||
|
||||
**Automated tool policy**: If you use an automated tool (e.g., static analysis,
|
||||
LLM, etc.), you need to demonstrate an understanding of the issue you are raising. Usually, a bug is demonstrated by a test case. Do not copy-paste what a tool is telling you.
|
||||
@ -364,8 +364,6 @@ fastfloat_strncasecmp3(UC const *actual_mixedcase,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename UC>
|
||||
@ -416,8 +414,6 @@ fastfloat_strncasecmp5(UC const *actual_mixedcase,
|
||||
return (actual_mixedcase[4] | 32) == (expected_lowercase[4]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Compares two ASCII strings in a case insensitive manner.
|
||||
|
||||
@ -1167,6 +1167,9 @@ TEST_CASE("double.general") {
|
||||
// DBL_TRUE_MIN / 2 + 0.0000000000000001e-324
|
||||
verify("2.4703282292062328e-324", 0x0.0000000000001p-1022);
|
||||
|
||||
verify("0.2470328229206232720e-323", 0.0, std::errc::result_out_of_range);
|
||||
verify("0.2470328229206232721e-323", 0x0.0000000000001p-1022);
|
||||
|
||||
verify("-2.2222222222223e-322", -0x1.68p-1069);
|
||||
verify("9007199254740993.0", 0x1p+53);
|
||||
verify("860228122.6654514319E+90", 0x1.92bb20990715fp+328);
|
||||
@ -1262,8 +1265,13 @@ TEST_CASE("double.general") {
|
||||
verify("4.9406564584124654e-324", 0x0.0000000000001p-1022);
|
||||
verify("2.2250738585072009e-308", 0x0.fffffffffffffp-1022);
|
||||
verify("2.2250738585072014e-308", 0x1p-1022);
|
||||
verify("0.2225073858507201136e-307", 0x0.fffffffffffffp-1022);
|
||||
verify("0.2225073858507201137e-307", 0x1p-1022);
|
||||
verify("1.7976931348623157e308", 0x1.fffffffffffffp+1023);
|
||||
verify("1.7976931348623158e308", 0x1.fffffffffffffp+1023);
|
||||
verify("1.7976931348623158079e308", std::numeric_limits<double>::max());
|
||||
verify("1.7976931348623158080e308", std::numeric_limits<double>::infinity(),
|
||||
std::errc::result_out_of_range);
|
||||
verify("4503599627370496.5", 4503599627370496.5);
|
||||
verify("4503599627475352.5", 4503599627475352.5);
|
||||
verify("4503599627475353.5", 4503599627475353.5);
|
||||
@ -1543,6 +1551,8 @@ TEST_CASE("float.general") {
|
||||
verify("0.7006492e-45", 0.f, std::errc::result_out_of_range);
|
||||
// FLT_TRUE_MIN / 2 + 0.0000001e-45
|
||||
verify("0.7006493e-45", 0x1p-149f);
|
||||
verify("0.7006492321624085354e-45", 0.f, std::errc::result_out_of_range);
|
||||
verify("0.7006492321624085355e-45", 0x1p-149f);
|
||||
|
||||
// max
|
||||
verify("340282346638528859811704183484516925440", 0x1.fffffep+127f);
|
||||
@ -1553,6 +1563,9 @@ TEST_CASE("float.general") {
|
||||
// that rounds to FLT_MAX
|
||||
verify("340282356779733661637539395458142568447",
|
||||
std::numeric_limits<float>::max());
|
||||
verify("0.3402823567797336616e39", std::numeric_limits<float>::max());
|
||||
verify("0.3402823567797336617e39", std::numeric_limits<float>::infinity(),
|
||||
std::errc::result_out_of_range);
|
||||
|
||||
verify("-1e-999", -0.0f, std::errc::result_out_of_range);
|
||||
verify("1."
|
||||
@ -1563,6 +1576,8 @@ TEST_CASE("float.general") {
|
||||
"175494140627517859246175898662808184331245864732796240031385942718174"
|
||||
"6759860647699724722770042717456817626953125e-38",
|
||||
0x1.fffff8p-127f);
|
||||
verify("1.1754942807573642917e-38", 0x1.fffffcp-127f);
|
||||
verify("1.1754942807573642918e-38", std::numeric_limits<float>::min());
|
||||
verify_runtime(
|
||||
append_zeros("1."
|
||||
"17549414062751785924617589866280818433124586473279624003138"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user