Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16-bit float support #296

Merged
merged 20 commits into from
Feb 7, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleaning.
lemire authored and dalle committed Dec 3, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit c5268999516bf6519b823553a4f911f3b257eeb2
14 changes: 7 additions & 7 deletions tests/basictest.cpp
Original file line number Diff line number Diff line change
@@ -307,13 +307,13 @@ bool check_file(std::string file_name) {
#ifdef __STDCPP_FLOAT16_T__
// Parse as 16-bit float
std::float16_t parsed_16{};
// auto fast_float_r16 =
fast_float::from_chars(number_string, end_of_string, parsed_16);
// if (fast_float_r16.ec != std::errc() &&
// fast_float_r16.ec != std::errc::result_out_of_range) {
// std::cerr << "16-bit fast_float parsing failure for: " + str +
// "\n"; return false;
// }
auto fast_float_r16 =
fast_float::from_chars(number_string, end_of_string, parsed_16);
if (fast_float_r16.ec != std::errc() &&
fast_float_r16.ec != std::errc::result_out_of_range) {
std::cerr << "16-bit fast_float parsing failure for: " + str + "\n";
return false;
}
#endif
// Parse as 32-bit float
float parsed_32;