Processing Decimal Values
summary
Computers store 0.1 as a non‑decimal binary value so exact decimal round‑trips fail; conversion needs Dragon4/Ryu conversion algorithms or costly big‑integer work to recover original digits. Decimal fixed‑point (integers scaled by 10^n) gives exact addition/multiplication when scale is known; decimal floating‑point (decimal64) gives 16 digits and exact decimal ops but rescaling/division is slow. Bloomberg’s bdldfp (decimal64) library and Intel’s DFP exist; software decimal is ~6× slower than binary for some workloads but remains practical.
AI-written summary · about
chapters (18)
- 0:00Start
- 0:18Processing Decimal Values
- 7:47Floating Point Representation
- 14:46Represent the Decimal Value
- 17:42Encoding of Decimal Values
- 20:42Basic Idea of the Algorithms
- 26:50Intel Decimal Floating Point Library
- 32:18Decimal Rounding
- 32:48Using a String
- 35:11Decimal Fixed Problem
- 37:04Binary Fixed Points
- 44:1464-Bit Representation of Decimals
- 45:42Replace the Division by Multiplication of Integers
- 48:13Decimal Floating Point
- 50:18Fast Root
- 50:49Restore a Decimal Value Which Was Stored in a Binary Floating Point
- 51:59How Many Significant Figures Are Available in Ieee 754 Dfp
- 56:57Slowdown
related talks
55mFormatting floating-point numbers
01h 04mBeyond the Floating Point Computations - What’s New, What’s Useful?
01h 00mSigned integers are two's complement
05mC++ Sorting Pitfalls, UB & Type Conversion Explained
01h 05mThe Many Faces of Number ⟷ String Conversions
01h 07mEmploying Modern C++ for High Performance Delta-Coding Compression
06mLightning Talk: Use SIMD Pairwise Reduction in C++!
01h 01mWhat’s In A Bit – Designing, Using And Reverse-engineering Binary File Formats
