C++ Floating Point Examples Introduction Integer Numbers Fixed Point Numbers Floating Point Numbers Floating Point Standard - IEEE-754 Floating point types in C++ Parsing Use case of parsing Influence of encoding on std::stof Influence of encoding on std::sstream Use of std::from_chars Parsing benchmarks Representation Floating type literals 32 bit floating point binary layout Meaningful digits estimation Closest representable neighbours Rounding IEEE 754 Standard Rounding Modes C++ Standard Round Style Floating Point Environment Global Rounding Style Comparison Special values Operator == Comparison Approaches Arithmetic Operations defined by IEEE 754 Exceptional conditions Not Guaranteed Associativity Loss of Significance Catastrophic cancellation Multiprecision libraries Arithmetic benchmarks Computation Siegfried Rump Example Summation Example Convergence Stability Compilation Value Safety Optimizations Affecting Value Safety Full Compliance to IEEE 754 Default Compliance to IEEE 754 Relaxed Compliance to IEEE 754 Fast Math CPU References CppCon 2015: John Farrier “Demystifying Floating Point" An Introduction To Floating Point Math - Martin Hořeňovský - NDC TechTown 2022 Floating point computations today and in the future - Boguslaw Cyganek - Meeting C++ 2022 A refresher on the floating-point computations and the standard library. - Boguslaw Cyganek Random ASCII – tech blog of Bruce Dawson University of Cambridge: Floating-Point Computation Onboarding floating-point Floating-Point Error Handling in C++: What Actually Works https://www.boost.org/library/latest/decimal/