frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

AWS Finally Built Its Own AWS Emulator

https://github.com/aws/aws-emulator
363•super_linear•2h ago•115 comments

Why are we still working this hard?

https://wilsoniumite.com/2026/11/11/why-are-we-still-working-this-hard/
61•Wilsoniumite•32m ago•34 comments

Tim Peters has died

https://discuss.python.org/t/in-memoriam-tim-peters-1952-2026/110028
517•ayhanfuat•13h ago•52 comments

A false smoke alarm almost drowned Jane Street's only NYC datacenter

https://michael.bacarella.com/2026/11/10/false-smoke-alarm-jane-street-datacenter/
289•mbac32768•3h ago•152 comments

AWS Emulator and the engineer's job when agents write the code

https://www.allthingsdistributed.com/2026/11/aws-emulator-and-the-engineers-job-when-agents-write...
78•drbm•2h ago•10 comments

Retirement Savings Are Fueling the AI Bubble

https://lpeproject.org/blog/your-retirement-savings-are-fueling-the-ai-bubble/
71•speckx•1h ago•48 comments

Show HN: I recreated Papers Please but you're deciding which YC startups to fund

https://termsheetplease.com/
75•bolau•1h ago•37 comments

Faster Retrieval for Better, More Efficient RAG

https://machinelearning.apple.com/research/faster-retrieval
95•zerop•3h ago•19 comments

Gemini Decisions API

https://blog.google/innovation-and-ai/technology/developers-tools/gemini-decisions-api/
60•iamdelirium•2h ago•10 comments

IBM Quantum Nighthawk Demonstrates New Levels of Speed and Quality

https://newsroom.ibm.com/2026-11-11-ibm-quantum-nighthawk-demonstrates-new-levels-of-speed-and-qu...
12•gok•49m ago•1 comments

Google SWE points 48 AI agents at NASA Lidar, finds unmapped Maya pyramid in 72h

https://pietromiotti.com/latest/maya-site/?maya
853•eyvindn•8h ago•313 comments

Hyper-Realistic Sand with WebGL2

https://av.github.io/safe-sand/
233•everlier•6h ago•55 comments

Show HN: Yogurt – Free, private, open-source alternative to Granola

https://github.com/FrigadeHQ/yogurt
105•brownrout•5h ago•55 comments

Atuin Threads: All your agent sessions on every machine

https://blog.atuin.sh/threads-agent-sessions/
150•linsomniac•6h ago•59 comments

Can a Linear Program Do Weight-Space Programming?

https://nathan.rs/posts/weight-space-lp/
205•emschwartz•8h ago•31 comments

The tiny transmitter tracking monarch butterflies' migration, Canada to Mexico

https://www.begiant.ca/stories/places/monarch-butterflies-tracking-conservation
15•upofadown•1d ago•3 comments

Launch HN: Pomerado (YC F26) – Turn any website into an MCP for agents

https://pomerado.ai/
31•alanjm23•3h ago•25 comments

Using voltage glitching to unleash the A100 in my mining card

https://blog.kate.land/posts/using-voltage-glitching-to-unlock-the-a100/
226•lae•9h ago•89 comments

Pharo in the Browser with WebAssembly

https://massimo-nocentini.github.io/pharo-vm/world.html
107•xkriva11•6h ago•31 comments

We need more goat sacrifices

https://www.experimental-history.com/p/we-need-more-goat-sacrifices
153•iamnothere•8h ago•92 comments

Beans at altitude: stovetop vs. pressure cooker

https://highaltitudelife.com/beans-at-altitude-stovetop-vs-pressure-cooker/
6•mooreds•2d ago•0 comments

AI, activity, and outcomes in software engineering

https://cabird.com/talks/shipping-faster/
80•azhenley•4h ago•89 comments

Tinfoil (YC P25) is hiring an applied AI security engineer in San Francisco

1•FrasiertheLion•8h ago

The Computer Graphics Book of Knowledge

https://www.cs.cmu.edu/~ph/nyit/masson/history.htm
47•num42•4h ago•18 comments

Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)

https://github.com/0xdeadf1sh/AssemblyForNeovim
89•0xdeadf1sh•7h ago•16 comments

TimeNet: Open-source data infrastructure for Temporal Foundation Models

https://github.com/OpenTSLM/TimeNet
38•rjakob•1d ago•6 comments

Attention to Mamba: A Recipe for Cross-Architecture Distillation

https://machinelearning.apple.com/research/attention-mamba-distillation
58•zerop•7h ago•3 comments

The Power and Legacy of Virginia Tech's Mac-Based Supercomputers

https://512pixels.net/2026/11/va-tech-system-x-system-g/
31•CharlesW•3h ago•5 comments

Show HN: Micron – Oberon with the Power of C

https://github.com/rochus-keller/Micron
36•Rochus•3d ago•10 comments

A C++ Quicksort Faster Than std:sort

https://tiki.li/blog/about_blqsort
30•signa11•1d ago•5 comments
Open in hackernews

Comparing floating-point numbers (2012)

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

Comments

LegionMammal978•1y 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•1y 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•1y 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.