finds.dev← search

// the find

douglascrockford/DEC64

★ 989 · C · updated Jul 2026

Decimal floating point

DEC64 is Douglas Crockford's proposed decimal floating-point format, meant to replace binary floats for money and other exact-decimal math in future language runtimes. It's not a library in the normal sense — it's a spec plus hand-written x64 assembly and a companion ARM64 port for the core arithmetic operators.

The x64 and ARM64 assembly for the elementary operators is the actual point of the project and looks to be carefully done, avoiding the rounding traps of IEEE 754 binary floats for decimal values. It's public domain, so there's zero licensing friction if you want to lift the format or the asm into something else. Having both a C++ port and a NASM port linked from third parties shows the design is portable enough that other people bothered to reimplement it.

dec64_math.c is explicitly labeled a placeholder by the author — sin, cos, sqrt, log, etc. are 'not accurate enough or fast enough,' which means the moment you need transcendental functions this stops being production-ready. It's core-only: no build system beyond a couple of stray Visual Studio recipe files, no packaging, no bindings for anything other than C. Last meaningful conceptual work is years old even though the push date is recent — this reads like a maintained spec rather than an actively evolving project, so check whether anyone has actually adopted the format before building on it.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →