frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Red Squares – GitHub outages as contributions

https://red-squares.cian.lol/
557•cianmm•4h ago•122 comments

The bottleneck was never the code

https://www.thetypicalset.com/blog/thoughts-on-coding-agents
202•Anon84•2d ago•133 comments

Setting up a Sun Ray server on OpenIndiana Hipster 2025.10

https://catstret.ch/202605/srss-hipster202510/
76•jandeboevrie•4h ago•13 comments

Agents can now create Cloudflare accounts, buy domains, and deploy

https://blog.cloudflare.com/agents-stripe-projects/
486•rolph•11h ago•262 comments

The Thinking Plant's Man (2025)

https://www.sciencehistory.org/stories/magazine/the-thinking-plants-man/
21•benbreen•1d ago•0 comments

StarFighter 16-Inch

https://us.starlabs.systems/pages/starfighter
515•signa11•12h ago•252 comments

CARA 2.0 – “I Built a Better Robot Dog”

https://www.aaedmusa.com/projects/cara2
300•hakonjdjohnsen•2d ago•40 comments

Knitting bullshit

https://katedaviesdesigns.com/2026/04/29/knitting-bullshit/
249•ColinEberhardt•9h ago•110 comments

Reverse-engineering the 1998 Ultima Online demo server

https://draxinar.github.io/articles/2026-05-01-uodemo-reverse-engineering.html
140•notsentient•8h ago•29 comments

Batteries Not Included, or Required, for These Smart Home Sensors

https://coe.gatech.edu/news/2026/04/batteries-not-included-or-required-these-smart-home-sensors
116•gnabgib•2d ago•43 comments

245TB Micron 6600 ION Data Center SSD Now Shipping

https://investors.micron.com/news-releases/news-release-details/industry-leading-245tb-micron-660...
163•neilfrndes•11h ago•106 comments

Cat (YC S22) Seeks Fractional Engineer to Build AI-Native Growth Toolkit

https://www.coveragecat.com/careers/engineering/fractional-growth-engineer
1•botacode•2h ago

Wolfenstein 3D for Gameboy Color on custom cartridge (2016)

https://www.happydaze.se/wolf/
72•ksymph•1d ago•9 comments

DNSSEC disruption affecting .de domains – Resolved

https://status.denic.de/pages/incident/592577eab611ce1e0d00046f/69fa60ef9d12f5057a974f38
712•warpspin•18h ago•375 comments

YouTube, your RSS feeds are broken

https://openrss.org/blog/youtube-your-feeds-are-broken
232•veeti•13h ago•85 comments

Multi-stroke text effect in CSS

https://yuanchuan.dev/multi-stroke-text-effect-in-css
166•cheeaun•10h ago•22 comments

Accelerating Gemma 4: faster inference with multi-token prediction drafters

https://blog.google/innovation-and-ai/technology/developers-tools/multi-token-prediction-gemma-4/
622•amrrs•22h ago•300 comments

Show HN: Adam – An embeddable cross-platform AI agent library

https://github.com/sqliteai/adam
7•marcobambini•1h ago•0 comments

Virtual violin produces realistic sounds

https://news.mit.edu/2026/mit-engineers-virtual-violin-produces-realistic-sounds-0429
42•gmays•3d ago•32 comments

Write some software, give it away for free

https://nonogra.ph/write-some-software-give-it-away-for-free-05-05-2026
322•nohell•17h ago•221 comments

Computer Use is 45x more expensive than structured APIs

https://reflex.dev/blog/computer-use-is-45x-more-expensive-than-structured-apis/
442•palashawas•22h ago•244 comments

Three Inverse Laws of AI

https://susam.net/inverse-laws-of-robotics.html
493•blenderob•23h ago•328 comments

EEVblog: The 555 Timer is 55 years old [video]

https://www.youtube.com/watch?v=6JhK8iCQuqI
311•brudgers•23h ago•80 comments

Google Chrome silently installs a 4 GB AI model on your device without consent

https://www.thatprivacyguy.com/blog/chrome-silent-nano-install/
1542•john-doe•1d ago•1033 comments

Today I've made the difficult decision to reduce the size of Coinbase by ~14%

https://twitter.com/brian_armstrong/status/2051616759145185723
436•adrianmsmith•1d ago•673 comments

Wiki Builder: Skill to Build LLM Knowledge Bases

https://academy.dair.ai/blog/wiki-builder-claude-code-plugin
99•omarsar•2d ago•11 comments

Shrinkflation Is Quietly Making All Gadgets Worse

https://gizmodo.com/shrinkflation-is-quietly-making-all-gadgets-worse-2000754565
20•cainxinth•2h ago•6 comments

Why most product tours get skipped

https://productonboarding.com/articles/why-product-tours-get-skipped
192•pancomplex•17h ago•161 comments

Telus Uses AI to Alter Call-Agent Accents

https://letsdatascience.com/news/telus-uses-ai-to-alter-call-agent-accents-a3868f63
201•debo_•13h ago•174 comments

I'm scared about biological computing

https://kuber.studio/blog/Reflections/I%27m-Scared-About-Biological-Computing
262•kuberwastaken•22h ago•209 comments
Open in hackernews

Comparing floating-point numbers (2012)

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

Comments

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