frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

AI agents aren't 'going rogue.' Frontier labs are skipping security basics

https://www.csoonline.com/article/4234854/ai-agents-arent-going-rogue-frontier-labs-are-skipping-...
578•latexr•2h ago•240 comments

Better HTTP/1 connection reuse in Go 1.27

https://go.dev/blog/http-connection-reuse
123•allddd•3h ago•21 comments

Fire at Starlink site in Bulgaria after suspected sabotage in Poland

https://dpa-international.com/politics/urn:newsml:dpa.com:20090101:261014-930-839530/
110•ilamont•1h ago•60 comments

Iosevka is an open-source, sans-serif and slab-serif monospace font

https://typeof.net/Iosevka/
625•otobrglez•11h ago•261 comments

Submarine cable resilience

https://blog.apnic.net/2026/10/14/submarine-cable-resilience/
102•speckx•4h ago•27 comments

Phloem: Git history grown like a slime mold

https://phloem.stemdeck.app/
23•thclpr•2d ago•8 comments

Neckbeard – a DevOps/platform/SRE plugin for your agent

https://github.com/bealesh/neckbeard
29•bealesh•2h ago•13 comments

Banks are now trying to offload the AI data center debt they just underwrote

https://startupfortune.com/banks-are-now-trying-to-offload-the-ai-data-center-debt-they-just-unde...
95•smartmic•1h ago•51 comments

Show HN: Petal, open-source CoScreen/ScreenHero finally free

https://petal.live/
29•thedracle•1h ago•5 comments

LittleJS is 2D and 3D now

https://frankforce.com/littlejs-is-2d-and-3d-now/
57•dmit•1d ago•11 comments

Google is silently linking your phone number across all signed-in accounts

https://www.androidauthority.com/google-auto-phone-number-verification-android-3723117/
193•Brajeshwar•3h ago•46 comments

Pg_vectorsearch: An index that is faster than pgvector's IVFFlat and HNSW

https://github.com/timescale/pg_vectorsearch
164•jascha_eng•8h ago•46 comments

Amazon pushes up prices across the Internet

https://www.not-ship.com/how-amazon-pushes-up-prices-all-across-the-internet/
625•sighborg•10h ago•542 comments

ICE Planning $100M 'Nightmare' Domestic Spy Program

https://prospect.org/2026/10/14/ice-planning-nightmare-domestic-spy-program-ero-one/
378•bhrlady•3h ago•170 comments

Show HN: I wrote an email app that accepts only one sender per inbox

https://clova.email/
33•edpin2000•2h ago•28 comments

America Didn't Lose Its Rare Earth Industry. It Sold It

https://www.lawfaremedia.org/article/america-didn-t-lose-its-rare-earth-industry.-it-sold-it
53•speckx•2h ago•15 comments

Private equity ownership affects dental practices

https://www.dentaleconomics.com/macro-op-ed/industry-news/news/55341670/how-does-private-equity-o...
4•paimapi•40m ago•0 comments

Show HN: Graphicle, a Rust port of Graphify with memory for coding agents

https://github.com/graphicle-ai/graphicle
31•KarLexAI•4h ago•9 comments

Tesla's Robotaxis Blow Through School Zones, NHTSA Petition Alleges

https://www.extremetech.com/cars/teslas-robotaxis-blow-through-school-zones-nhtsa-petition-alleges
89•speckx•3h ago•58 comments

Suicide rates highest ever among middle-aged men

https://www.telegraph.co.uk/news/2026/10/13/suicide-rates-highest-ever-among-middle-aged-men/
17•ivewonyoung•48m ago•2 comments

Running Windows desktop tests from Linux with disposable VMs

https://www.qawolf.com/blog/how-we-solved-windows-desktop-automation
63•jadenlemmon•4h ago•25 comments

Strands Decider: Why Not an Encoder?

https://brooker.co.za:443/blog/2026/10/04/encoders.html
28•surprisetalk•5h ago•1 comments

The Gold-Bug: Edgar Allan Poe's story that taught me about cryptography (2024)

https://robotsinplainenglish.com/e/2024-01-21-gold-bug.html
55•ripe•2d ago•12 comments

The Origin Story of Kid Pix

http://red-green-blue.com/kid-pix-the-early-years
168•MBCook•1d ago•36 comments

Nvidia's first GPU: GeForce 256

https://dfarq.homeip.net/nvidias-first-gpu-geforce-256/
49•ibobev•7h ago•32 comments

Sound (2022)

https://ciechanow.ski/sound/
259•dverlaeckt80•3d ago•32 comments

TV4 postpones show after AI agent erases edited material

https://swedenherald.com/article/tv4-postpones-the-challenge-until-2027-after-technical-failure-e...
126•tobr•9h ago•68 comments

Do dentists know what they're doing?

https://mapwriting.substack.com/p/dentists
120•doitLP•2d ago•100 comments

Scientists Are Teaching Birds to Sing Lost Songs

https://e360.yale.edu/digest/teaching-birds-lost-songs
33•speckx•6h ago•3 comments

Show HN: A guided 3D Leonardo da Vinci museum, built in code

https://museumofages.org/w/vinci
83•micstradev•9h ago•34 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.