frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

DEC64: Decimal Floating Point (2020)

https://www.crockford.com/dec64.html
29•vinhnx•1w ago

Comments

mildred593•1w ago
Can't wait to have it in my language!
cozzyd•2h ago
The memory savings from 32 bit or even 16 bit floats are definitely not pointless! Not to mention doubling simd throughput. Speaking of which, without simd support this certainly can't be used in a lot of applications. Definitely makes sense for financial calculations though.
pwdisswordfishy•2h ago
This seems optimized for fast integer operations. Except that if I only cared about integers, I'd use an actual integer type.
cozzyd•2h ago
Well I suppose it might be preferable if javascript used this type...
sjrd•1h ago
JavaScript engines do optimize integers. They usually represent integers up to +-2^30 as integers and apply integer operations to them. But of course that's not observable.
lifthrasiir•1h ago
Previously:

https://news.ycombinator.com/item?id=7365812 (2014, 187 comments)

https://news.ycombinator.com/item?id=10243011 (2015, 56 comments)

https://news.ycombinator.com/item?id=16513717 (2018, 78 comments)

https://news.ycombinator.com/item?id=20251750 (2019, 37 comments)

Also my past commentary about DEC64:

> Most strikingly DEC64 doesn't do normalization, so comparison will be a nightmare (as you have to normalize in order to compare!). He tried to special-case integer-only arguments, which hides the fact that non-integer cases are much, much slower thanks to added branches and complexity. If DEC64 were going to be "the only number type" in future languages, it had to be much better than this.

lambdaone•1h ago
If you want the job done properly, this already exists: https://en.wikipedia.org/wiki/Decimal128_floating-point_form...
mgaunard•1h ago
There are a bunch of different encodings for decimal floating-point. I fail to see how this is the standard that all languages are converging to.

IEEE754 normalizes two encodings, BID and DPD, for decimal32, decimal64 and decimal128 precision presets. This is neither of those.

Many libraries use an approach with a simple significand + exponent, similar to the article, but the representation is not standardized, some use full integral types for this rather than specific bits (C# uses 96+32, Python uses a tuple of arbitrary integers). It's essentially closer to fixed-point but with a variable exponent.

The representation from the article is definitely a fairly good compromise though, specifically if you're dealing with mostly-fixed-point data.

spacedcowboy•1h ago
Atari 8-bit basic used something pretty similar to this [1], except it did have normalization. It only had 10 BCD digits (5 bytes) and 2 digits (1 byte) for exponent, so more of a DEC48 but still… That was a loooong time ago…

It was slightly more logical to use BCD on the 6502 because it had a BCD maths mode [2], so primitive machine opcodes (ADC, SBC) could understand BCD and preserve carry, zero etc flags

[1]: https://www.atarimax.com/freenet/freenet_material/5.8-BitCom...

[2]: http://www.6502.org/tutorials/decimal_mode.html

shawn_w•44m ago
I was expecting something about floating point formats used by some DEC PDP series computer...
RustyRussell•6m ago
A goid friend of mine worked on decimal floating point for IBM Power chips (I think it was Power 7 which had hardware support).

Anyway, he insisted on calling it just "Decimal Floating". Because there was "no point".

XSLT RIP

https://xslt.rip/
163•edent•1h ago•105 comments

Realtime BART Arrival Display

https://filbot.com/real-time-bart-display/
76•Jadrago•2h ago•15 comments

Beets: The music geek's media organizer

https://beets.io/
39•hyperific•2h ago•19 comments

Marble Fountain

https://willmorrison.net/posts/marble-fountain/
687•chris_overseas•17h ago•80 comments

Ask HN: What Are You Working On? (Nov 2025)

252•david927•12h ago•708 comments

How the UK lost its shipbuilding industry

https://www.construction-physics.com/p/how-the-uk-lost-its-shipbuilding
88•surprisetalk•8h ago•158 comments

DEC64: Decimal Floating Point (2020)

https://www.crockford.com/dec64.html
29•vinhnx•1w ago•11 comments

Montana becomes first state to enshrine 'right to compute' into law

https://montananewsroom.com/montana-becomes-first-state-to-enshrine-right-to-compute-into-law/
437•bilsbie•20h ago•235 comments

Building a 2.5kWh battery from disposable vapes to power my workshop [video]

https://www.youtube.com/watch?v=dy-wFixuRVU
199•rsanek•6d ago•107 comments

Drilling down on Uncle Sam's proposed TP-Link ban

https://krebsonsecurity.com/2025/11/drilling-down-on-uncle-sams-proposed-tp-link-ban/
194•todsacerdoti•15h ago•224 comments

The Linux Kernel Looks to "Bite the Bullet" in Enabling Microsoft C Extensions

https://www.phoronix.com/news/Linux-6.19-Patch-Would-MS-Ext
25•keyle•1h ago•6 comments

Itiner-e: the Google Maps of Roman Roads

https://itiner-e.org/
88•helsinkiandrew•23h ago•17 comments

JVM exceptions are weird: a decompiler perspective

https://purplesyringa.moe/blog/jvm-exceptions-are-weird-a-decompiler-perspective/
124•vrnvu•6d ago•31 comments

EU takes aim at plastic pellets to prevent their nightmare cleanup

https://www.yahoo.com/news/articles/eu-takes-aim-plastic-pellets-030314496.html
21•PaulHoule•1h ago•4 comments

A brief history of Time Machine (2024)

https://eclecticlight.co/2024/09/07/a-brief-history-of-time-machine/
18•firloop•6d ago•8 comments

Today I Learned: Binfmt_misc

https://dfir.ch/posts/today_i_learned_binfmt_misc/
57•malmoeb•6d ago•15 comments

The Manuscripts of Edsger W. Dijkstra

https://www.cs.utexas.edu/~EWD/
221•nathan-barry•18h ago•86 comments

The Principles of Diffusion Models

https://arxiv.org/abs/2510.21890
184•Anon84•17h ago•18 comments

Lee Felsenstein

https://en.wikipedia.org/wiki/Lee_Felsenstein
15•nickt•6d ago•0 comments

What If Java Had Symmetric Converter Methods on Collection?

https://donraab.medium.com/what-if-java-had-symmetric-converter-methods-on-collection-cbb824885c3f
3•xkriva11•6d ago•0 comments

BBC director general and News CEO resign in bias controversy

https://www.bbc.co.uk/news/live/cd9kqz1yyxkt
14•mellosouls•1h ago•11 comments

Show HN: DroidDock – A sleek macOS app for browsing Android device files via ADB

https://rajivm1991.github.io/DroidDock/
61•rajivm1991•8h ago•29 comments

Understanding Financial Functions in Excel

https://ciju.in/writings/understanding-financial-functions-excel-sheets
30•ciju•5d ago•3 comments

Bumble Berry Pi – A Cheap DIY Raspberry Pi Handheld Cyberdeck

https://github.com/samcervantes/bumble-berry-pi
146•MakerSam•16h ago•29 comments

The Sega Master System

https://bumbershootsoft.wordpress.com/2025/11/08/the-sega-master-system/
91•ibobev•14h ago•28 comments

Sued by Nintendo

https://www.suedbynintendo.com/
176•notepad0x90•9h ago•49 comments

Reviving Classic Unix Games: A 20-Year Journey Through Software Archaeology

https://vejeta.com/reviving-classic-unix-games-a-20-year-journey-through-software-archaeology/
153•mwheeler•20h ago•65 comments

Former Nintendo employees reveal what it took to launch the NES

https://hanafuda.report/articles/former-nintendo-employees-reveal-what-it-took-to-launch-the-nes-...
132•brandrick•6d ago•22 comments

Email verification protocol

https://github.com/WICG/email-verification-protocol
172•sgoto•1w ago•123 comments

Zensical – A modern static site generator built by the Material for MkDocs team

https://squidfunk.github.io/mkdocs-material/blog/2025/11/05/zensical/
146•japhyr•20h ago•55 comments