Double-double: 31 digits of precision without leaving the FPU

·Hacker News··

If you ever need more precision than what 15 decimal digits of the double format can offer, there is a neat trick: glue two doubles together and treat them as one number. This gives you ~31 decimal digits for roughly 9x the cost of a plain double in a real kernel (4-12x per isolated operation). With no heap allocation and no dependencies, this puts it almost exactly halfway between a double and an arbitrary-precision library perf-wise. This post explains the error-free transformations that make

Read full article →

Related Articles

Malicious Rust crate Arrayref runs a build-time payload
abhisek · Hacker News · 4h ago
AliExpress runs silent WebAudio fingerprinting that breaks Bluetooth multipoint
emctech · Hacker News · 7h ago
Turns are Better than Radians (2022)
mayoff · Hacker News · 16h ago
Google has stopped pushing Git tags for some Android source code
Animux · Hacker News · 23h ago
Devices with GrapheneOS support should be available in 2027
exceptione · Hacker News · 1d ago