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

Unauthenticated remote code execution in Nginx
speedping · Hacker News · 1d ago
Cooling buildings is overtaking heating them as an energy need, IEA says
robtherobber · Hacker News · 8h ago
Ruby2ßhell: Pre-authentication RCE on stock Rails
jdns · Hacker News · 18h ago
Pancreatic cancer halted by virus injection in three patients
cybermango · Hacker News · 5h ago
Highly classified US national security communications network goes down
monkeydust · Hacker News · 2d ago