<commit_before>/*
C++ working draft
7.9.1
If the source value is between two adjacent destination values, the result
of the conversion is an implementation-defined choice of either of those
values. Otherwise, the behavior is undefined.
*/
#include <cstdlib>
#include <iostream>

int main() {
  static constexpr double kLargeDouble = 1e100;
  std::cout << static_cast<float>(kLargeDouble) << std::endl;
  return 0;
}
<commit_msg>Update docs on double to float<commit_after>/*
http://eel.is/c++draft/conv.double#1
7 Expressions [expr]
7.3 Standard conversions [conv]
7.3.9 Floating-point conversions [conv.double]
1 A prvalue of floating-point type can be converted to a prvalue of another floating-point type.
  If the source value can be exactly represented in the destination type, the result of the conversion is that exact representation.
  If the source value is between two adjacent destination values, the result of the conversion is an implementation-defined choice of either of those values.
  Otherwise, the behavior is undefined.

https://docs.microsoft.com/en-us/cpp/c-language/conversions-from-floating-point-types?view=vs-2019
Represent as a float. If double value can't be represented exactly as float, loss of precision occurs. If value is too large to be represented as float, the result is undefined.
*/
#include <cstdlib>
#include <iostream>

int main() {
  static constexpr double kLargeDouble = 1e100;
  std::cout << static_cast<float>(kLargeDouble) << std::endl;
  return 0;
}

{'fraction_non_alphanumeric': 0.08678237650200267, 'fraction_numerical': 0.016688918558077435, 'mean_word_length': 4.743295019157088, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 9, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5260821', 'n_tokens_mistral': 435, 'n_tokens_neox': 412, 'n_words': 182}