frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Hold on to Your Hardware

https://xn--gckvb8fzb.com/hold-on-to-your-hardware/
133•LucidLynx•1h ago•86 comments

A Faster Alternative to Jq

https://micahkepe.com/blog/jsongrep/
161•pistolario•4h ago•82 comments

Schedule tasks on the web

https://code.claude.com/docs/en/web-scheduled-tasks
170•iBelieve•7h ago•121 comments

The European AllSky7 fireball network

https://www.allsky7.net/#archive
69•marklit•5h ago•7 comments

Apple discontinues the Mac Pro

https://9to5mac.com/2026/03/26/apple-discontinues-the-mac-pro/
420•bentocorp•14h ago•331 comments

Why so many control rooms were seafoam green (2025)

https://bethmathews.substack.com/p/why-so-many-control-rooms-were-seafoam
854•Amorymeltzer•1d ago•166 comments

Everything old is new again: memory optimization

https://nibblestew.blogspot.com/2026/03/everything-old-is-new-again-memory.html
58•ibobev•3d ago•23 comments

Local Bernstein theory, and lower bounds for Lebesgue constants

https://terrytao.wordpress.com/2026/03/23/local-bernstein-theory-and-lower-bounds-for-lebesgue-co...
9•jjgreen•3d ago•0 comments

Show HN: I put an AI agent on a $7/month VPS with IRC as its transport layer

https://georgelarson.me/writing/2026-03-23-nullclaw-doorman/
268•j0rg3•13h ago•75 comments

$500 GPU outperforms Claude Sonnet on coding benchmarks

https://github.com/itigges22/ATLAS
306•yogthos•18h ago•173 comments

QRV Operating System: QNX on RISC-V

https://r-tty.blogspot.com/2026/03/qrv-operating-system-first-publication.html
16•chrsw•4d ago•3 comments

The Legibility of Serif and Sans Serif Typefaces (2022)

https://library.oapen.org//handle/20.500.12657/53344
52•the-mitr•3d ago•20 comments

We rewrote JSONata with AI in a day, saved $500k/year

https://www.reco.ai/blog/we-rewrote-jsonata-with-ai
183•cjlm•13h ago•171 comments

DOOM Over DNS

https://github.com/resumex/doom-over-dns
301•Venn1•3d ago•84 comments

My minute-by-minute response to the LiteLLM malware attack

https://futuresearch.ai/blog/litellm-attack-transcript/
383•Fibonar•20h ago•146 comments

Whistler: Live eBPF Programming from the Common Lisp REPL

https://atgreen.github.io/repl-yell/posts/whistler/
104•varjag•3d ago•9 comments

Show HN: Minimalist library to generate SVG views of scientific data

https://github.com/alefore/mini_svg/
34•afc•3d ago•2 comments

Running Tesla Model 3's computer on my desk using parts from crashed cars

https://bugs.xdavidhu.me/tesla/2026/03/23/running-tesla-model-3s-computer-on-my-desk-using-parts-...
901•driesdep•1d ago•312 comments

HyperAgents: Self-referential self-improving agents

https://github.com/facebookresearch/hyperagents
194•andyg_blog•2d ago•69 comments

Generators in Lone Lisp

https://www.matheusmoreira.com/articles/generators-in-lone-lisp
42•matheusmoreira•3d ago•8 comments

Anthropic Subprocessor Changes

https://trust.anthropic.com
84•tencentshill•14h ago•41 comments

Agent-to-agent pair programming

https://axeldelafosse.com/blog/agent-to-agent-pair-programming
81•axldelafosse•10h ago•27 comments

We haven't seen the worst of what gambling and prediction markets will do

https://www.derekthompson.org/p/we-havent-seen-the-worst-of-what
766•mmcclure•16h ago•533 comments

Using FireWire on a Raspberry Pi

https://www.jeffgeerling.com/blog/2026/firewire-on-a-raspberry-pi/
91•jandeboevrie•15h ago•43 comments

OpenTelemetry profiles enters public alpha

https://opentelemetry.io/blog/2026/profiles-alpha/
171•tanelpoder•19h ago•26 comments

Chroma Context-1: Training a Self-Editing Search Agent

https://www.trychroma.com/research/context-1
47•philip1209•16h ago•3 comments

Show HN: Fio: 3D World editor/game engine – inspired by Radiant and Hammer

https://github.com/ViciousSquid/Fio
75•vicioussquid•15h ago•7 comments

John Bradley, author of xv, has died

https://voxday.net/2026/03/25/rip-john-bradley/
277•linsomniac•17h ago•81 comments

Colibri – chat platform built on the AT Protocol for communities big and small

https://colibri.social/
123•todotask2•18h ago•78 comments

An unstoppable mushroom is tearing through North American forests

https://www.bbc.com/future/article/20260325-an-unstoppable-mushroom-is-tearing-through-north-amer...
59•1659447091•14h ago•12 comments
Open in hackernews

Comparing floating-point numbers (2012)

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

Comments

LegionMammal978•10mo 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•10mo 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•10mo 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.