frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Gemini Pro 3 hallucinates the HN front page 10 years from now

https://dosaygo-studio.github.io/hn-front-page-2035/news
613•keepamovin•3h ago•275 comments

PeerTube is recognized as a digital public good by Digital Public Goods Alliance

https://www.digitalpublicgoods.net/r/peertube
112•fsflover•1h ago•16 comments

Mistral Releases Devstral 2 (72.2% SWE-Bench Verified) and Vibe CLI

https://mistral.ai/news/devstral-2-vibe-cli
252•pember•3h ago•91 comments

Handsdown one of the coolest 3D websites

https://bruno-simon.com/
165•razzmataks•2h ago•43 comments

Kaiju – General purpose 3D/2D game engine in Go and Vulkan with built in editor

https://github.com/KaijuEngine/kaiju
101•discomrobertul8•3h ago•41 comments

LLM from scratch, part 28 – training a base model from scratch on an RTX 3090

https://www.gilesthomas.com/2025/12/llm-from-scratch-28-training-a-base-model-from-scratch
376•gpjt•1w ago•86 comments

My favourite small hash table

https://www.corsix.org/content/my-favourite-small-hash-table
61•speckx•3h ago•12 comments

Launch HN: Mentat (YC F24) – Controlling LLMs with Runtime Intervention

https://playground.ctgt.ai
17•cgorlla•2h ago•9 comments

Clearspace (YC W23) Is Hiring a Founding Designer

https://www.ycombinator.com/companies/clearspace/jobs/yamWTLr-founding-designer-at-clearspace
1•roycebranning•1h ago

The Joy of Playing Grandia, on Sega Saturn

https://www.segasaturnshiro.com/2025/11/27/the-joy-of-playing-grandia-on-sega-saturn/
147•tosh•8h ago•85 comments

AWS Trainium3 Deep Dive – A Potential Challenger Approaching

https://newsletter.semianalysis.com/p/aws-trainium3-deep-dive-a-potential
40•Symmetry•4d ago•12 comments

Show HN: AlgoDrill – Interactive drills to stop forgetting LeetCode patterns

https://algodrill.io
120•henwfan•7h ago•78 comments

Transformers know more than they can tell: Learning the Collatz sequence

https://www.arxiv.org/pdf/2511.10811
81•Xcelerate•6d ago•30 comments

Donating the Model Context Protocol and Establishing the Agentic AI Foundation

https://www.anthropic.com/news/donating-the-model-context-protocol-and-establishing-of-the-agenti...
19•meetpateltech•1h ago•6 comments

Constructing the Word's First JPEG XL MD5 Hash Quine

https://stackchk.fail/blog/jxl_hashquine_writeup
75•luispa•1w ago•16 comments

30 Year Anniversary of WarCraft II: Tides of Darkness

https://www.jorsys.org/archive/december_2025.html#newsitem_2025-12-09T07:42:19Z
95•sjoblomj•9h ago•69 comments

Ask HN: Should "I asked $AI, and it said" replies be forbidden in HN guidelines?

349•embedding-shape•2h ago•194 comments

Icons in Menus Everywhere – Send Help

https://blog.jim-nielsen.com/2025/icons-in-menus/
767•ArmageddonIt•22h ago•306 comments

AI needs more power than the grid can deliver – supersonic tech can fix that

https://boomsupersonic.com/flyby/ai-needs-more-power-than-the-grid-can-deliver-supersonic-tech-ca...
27•simonebrunozzi•2h ago•33 comments

Show HN: Detail, a Bug Finder

https://detail.dev/
18•drob•1h ago•6 comments

A deep dive into QEMU: The Tiny Code Generator (TCG), part 1 (2021)

https://airbus-seclab.github.io/qemu_blog/tcg_p1.html
65•costco•1w ago•2 comments

Oliver Sacks Put Himself into His Case Studies. What Was the Cost?

https://www.newyorker.com/magazine/2025/12/15/oliver-sacks-put-himself-into-his-case-studies-what...
30•barry-cotter•4h ago•11 comments

Brent's Encapsulated C Programming Rules (2020)

https://retroscience.net/brents-c-programming-rules.html
55•p2detar•7h ago•27 comments

Epsilon: A WASM virtual machine written in Go

https://github.com/ziggy42/epsilon
126•ziggy42•1w ago•30 comments

ZX Spectrum Next on the Internet: Xberry Pi ESP01 and Pi Zero Upgrades

https://retrogamecoders.com/zx-spectrum-next-on-the-internet-xberry-pi-esp01-and-pi-zero-upgrades/
48•ibobev•7h ago•0 comments

After the Bubble

https://www.tbray.org/ongoing/When/202x/2025/12/07/Thin-Spots-In-the-AI-Bubble
40•savant2•6h ago•24 comments

Kroger acknowledges that its bet on robotics went too far

https://www.grocerydive.com/news/kroger-ocado-close-automated-fulfillment-centers-robotics-grocer...
247•JumpCrisscross•18h ago•276 comments

The universal weight subspace hypothesis

https://arxiv.org/abs/2512.05117
344•lukeplato•18h ago•121 comments

If you're going to vibe code, why not do it in C?

https://stephenramsay.net/posts/vibe-coding.html
73•sramsay•1h ago•81 comments

Animalcules and Their Motors

https://www.asimov.press/p/flagella
6•surprisetalk•6d ago•1 comments
Open in hackernews

Comparing floating-point numbers (2012)

https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
26•sph•7mo ago

Comments

LegionMammal978•6mo ago
I'd argue that any equality comparison of floating-point numbers is asking for trouble, unless you're specifically working with small dyadic fractions (using exact comparison) or testing a purely heuristic 'closeness' condition (using fuzzy comparison).

Of course, inequalities show up in a lot more places, but are similarly fraught with difficulty, since mathematical statements may fail to translate to floating-point inequalities. E.g., in computational geometry, people have written entire papers about optimizing correct orientation predicates [0], since the naive method can easily break at small angles. This sort of thing is what often shows up as tiny seams in 3D video-game geometry.

[0] https://www.cs.cmu.edu/~quake/robust.html

mtklein•6mo ago
My preferred way to compare floats as being interchangeably equivalent in unit tests is

    bool equiv(float x, float y) {
        return (x <= y && y <= x)
            || (x != x && y != y);
    }
This handles things like ±0 and NaNs (while NaNs can't be IEEE-754-equal per se, they're almost always interchangeable), and convinces -Wfloat-equal you kinda know what you're doing. Also everything visually lines up real neat and tidy, which I find makes it easy to remember.

Outside unit tests... I haven't really encountered many places where float equality is actually what I want to test. It's usually some < or <= condition instead.

sph•6mo ago
I have built a production Javascript library with decent amounts of users that incorporates the following hack to deal with float error (avert your eyes if you're sensitive):

  // 1.2 - 1.0 === 0.19999999999999996
  // fixFloatError(1.2 - 1.0) === 0.2
  var fixFloatError = function (n) {
    return parseFloat(n.toPrecision(12));
  };
It felt correct at the time, but after reading the article, I cringe at how fundamentally broken it is. I got away with it because the library is used to convert betting odds, which are mostly small floating point numbers, so the error is often < 10^-12.