fixed_point
summary
Library provides literal class templates for safe integers and binary fixed‑point that guarantee correct scaling and avoid silent precision loss; arithmetic widening on multiply produces results wide enough to hold full products (e.g., two 16‑bit u8.8 values yield a 32‑bit intermediate), with checked, rounded and elastic variants to catch overflow or auto‑grow. Implementation reuses Boost.Multiprecision integration and demo code shows 400+400‑bit fixed‑point values working and composing with elastic integers.
AI-written summary · about
chapters (12)
- 0:00Intro
- 1:19What's Wrong With Floating-Point?
- 4:11fixed_point.h (version 0)
- 7:06Criticisms?
- 10:28Hypothesis
- 12:03Suggestions
- 16:33Class Template
- 19:00Arithmetic Operators - The 'Multiply Problem
- 22:35Arithmetic Functions
- 26:18Composition
- 29:58Safety
- 33:36Language Features
related talks
46mIntegers, Floating Points or Exotic Representations ...
01h 05m“Safe Numerics”
01h 05mA C++ Approach to Physical Units
50mRecent Advances in Floating-point (Static) Analyses
59mThe Most Average Function There Is
01h 09m“Boost Units Library for Correct Code"
57mSane and Safe C++ Class Types
41m“Avoiding Disasters with Strongly Typed C++”
