frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

F-Droid 2.0

https://f-droid.org/2026/09/24/f-droid-2.0-a-new-chapter-for-android-freedom.html
697•daveoc64•5h ago•200 comments

Show HN: Make cursed fonts like Times New Bastard

https://bastardica.mitpit.com
250•MitPitt•22h ago•41 comments

Show HN: Whiteboard (YC W26) – An open-source IDE for thoughtful software design

https://github.com/devdotfast/whiteboard
129•sidharthkmenon•3h ago•50 comments

Fearless SIMD v1.0

https://linebender.org/blog/fearless-simd-1-0/
110•verdagon•2d ago•18 comments

Rails World 2026 Opening Keynote [video]

https://www.youtube.com/watch?v=vDjW_dRyKXY
149•an0malous•1d ago•135 comments

Using LLMs to trace alchemical knowledge and decode 17th century letters

https://resobscura.substack.com/p/ai-labs-need-to-start-funding-historical
25•benbreen•1h ago•4 comments

My weird new hobby: Wandering around Tokyo on Google Maps

https://ahmedhossamdev.com/writing/my-weird-new-hobby-wandering-around-tokyo/
129•ahmedhossamdev•2d ago•46 comments

The forgotten battle of East Lansing

https://eastlansinginfo.news/the-forgotten-battle-of-east-lansing/
64•rmason•3d ago•7 comments

Book review: Is parallel programming hard, and, if so, what can you do about it?

https://ahelwer.ca/post/2026-09-21-concurrency-textbook/
57•ahelwer•3d ago•13 comments

Why is the liver so weirdly regenerative?

https://dynomight.substack.com/p/liver
117•jbotz•4h ago•91 comments

Stable (YC W20) Is Hiring Product Engineers

https://www.usestable.com/careers/product-engineer
1•collinpham•2h ago

Sourcehut account takeover via build logs (XSS in ansi2html)

https://blog.arusekk.pl/posts/srht-account-takeover/
17•arusekk•1h ago•1 comments

Google’s Project Suncatcher to put ML infrastructure in space

https://blog.google/innovation-and-ai/models-and-research/google-research/google-project-suncatch...
54•xnx•7h ago•92 comments

Forging 1024-bit RSA signatures in nearly SNFS time [pdf]

https://eprint.iacr.org/2026/2131.pdf
35•int0x29•6h ago•5 comments

Two-tier encryption in the UK

https://macanorak.com/two-tier-encryption-in-the-uk/
332•ReturnoftheHack•10h ago•343 comments

Geothermal heat map of US hot springs

https://www.soakingsprings.com/hot-springs/geothermal-map
52•armenarmen•1d ago•19 comments

WaveDigger: Dig into wireless signals to discover their physical locations

https://github.com/christianrowlands/wavedigger
72•882542F3884314B•1d ago•11 comments

Creatine uptake enhances antitumor immunity

https://www.cell.com/iscience/fulltext/S2589-0042(26)00811-4
118•lormayna•2h ago•143 comments

Security auditing in the age of (good enough) AI

https://blog.trailofbits.com/2026/09/18/auditing-in-the-age-of-good-enough-ai/
40•aray07•2d ago•1 comments

Web-based IBM 1620 emulator and IPL-V from 1963

https://github.com/pkimpel/retro-1620
44•abrax3141•1d ago•11 comments

A Million Agents Is a Distributed System Problem

https://www.instacloud.com/blogs/a-million-agents-is-a-distributed-systems-problem
22•tonychang430•3h ago•6 comments

Early rogue AI agent activity and attempts to hack found on urlquery.net

https://transluce.org/agent-activity
216•snikolaev•15h ago•197 comments

Show HN: Treepeat – Code similarity detection using Tree-sitter

https://github.com/dsummersl/treepeat
35•91awebsi•2d ago•1 comments

2DWillNeverDie

https://2dwillneverdie.com/
5•surprisetalk•2d ago•0 comments

Opus 5.5 is good at explainer videos

https://launchvideo.io
3•iacguy•31m ago•1 comments

Nokia Design Archive (2025)

https://repo.aalto.fi/index.php?name=SO_b66a9391-dcf8-4399-8e87-611f84c3fc4c
200•pillars•11h ago•108 comments

August 27 TCRF DDoS Attack Postmortem

https://blog.xkeeper.net/the-cutting-room-floor/tcrf-2026-ddos-postmortem/
7•panic•1h ago•0 comments

Show HN: AgentRun: DSL to turn agents into workflows

https://github.com/Parcha-ai/agentrun
31•miguelrios•1d ago•3 comments

Mamdani is the most popular elected official in NYC: poll

https://www.nydailynews.com/2026/09/23/mamdani-is-the-most-popular-elected-official-in-nyc-poll/
12•downbad_•34m ago•0 comments

Motor Characterization for Small Running Robots (2016)

https://robot-daycare.com/posts/2016-01-06-motor-characterization-for-small-running-robots/
19•loughnane•2d ago•0 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.