frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Hybrid Reasoning Agents: LLM agents that think in latent space, act through text

https://arxiv.org/abs/2610.18861
126•allinonai•2h ago•69 comments

Someone behind the software

https://karrisaarinen.com/posts/someone-behind-the-software/
262•tosh•6h ago•112 comments

Free Pascal compiler now supports dynamic packages

https://www.getlazarus.org/dynamic/
93•sysrpl•4h ago•12 comments

There's never been a better time to go into math (by: 3blue1brown) [video]

https://www.youtube.com/watch?v=LKrwhjOI8Nc
90•mdp2021•23h ago•31 comments

RepRapMicron

https://github.com/VikOlliver/RepRapMicron/wiki
316•RobotToaster•9h ago•49 comments

Dogs seem to agree with humans that 'bouba' is round and 'kiki' is spiky

https://www.sciencealert.com/dogs-seem-to-agree-with-humans-that-bouba-is-round-and-kiki-is-spiky
82•gmays•21h ago•59 comments

Show HN: WhatsApp MCP running free on Cloudflare

https://github.com/finereli/whatsapp-mcp
14•zoozla•1h ago•4 comments

PalmOS Lemmings

https://github.com/ardiri/palmos-lemmings
76•memalign•5h ago•20 comments

One parser, two bugs, many routers: Exploiting Broadcom WiFi across eCos, Linux

https://quentinkaiser.be/security/2026/10/16/one-parser-two-bugs/
32•zoobab•2d ago•8 comments

DeepSeek search and fetch – $0.75 per 1000 successful requests

https://api-docs.deepseek.com/guides/search/
520•fagnerbrack•16h ago•250 comments

16-bit fully functional DIY magnetic core memory

https://www.youtube.com/watch?v=OJ1WYyO2jdY
18•oliculipolicula•3d ago•3 comments

They war-gamed dimming the Sun. It went worse than you think

https://www.wired.com/story/they-war-gamed-dimming-the-sun-it-went-even-worse-than-you-think/
11•rbanffy•3d ago•8 comments

Java sealed classes and exhaustive pattern matching

https://neilmadden.blog/2026/04/24/java-sealed-classes-and-exhaustive-pattern-matching/
123•hnisjafx40•8h ago•98 comments

The Intel 8087 chip: floating-point addition and subtraction

https://www.righto.com/2026/10/8087-addition-subtraction-microcode.html
83•pwg•6h ago•24 comments

Developing for Debugging (2025)

https://www.davepacheco.net/blog/2025/developing-for-debugging-dns-propagation/
22•mpweiher•1d ago•0 comments

SIGSALY: Churchill's top secret hotline to the president

https://www.iwm.org.uk/history/iwm/cwr/telephone
100•stmw•4d ago•31 comments

Show HN: The Zelda timeline to catch up before the Ocarina of Time remake

https://legendofhyrule.com/
151•jsomau•10h ago•90 comments

Namecheap just seized and disabled all my domains

https://www.reddit.com/r/sysadmin/comments/1x8cycd/namecheap_just_seized_and_disabled_all_my_doma...
352•sashk•6h ago•165 comments

Open MicroManipulator – A sub-micrometer 3D motion control plattform

https://github.com/0x23/MicroManipulatorStepper
168•_Microft•11h ago•13 comments

Beyond Tetris: The other games of Alexey Pajitnov [video]

https://www.youtube.com/watch?v=QH_LPimUJMs
50•zdw•1d ago•3 comments

I electrified my push scooter with a power drill

https://eddieabbondanz.io/post/shop/drill-powered-scooter/
104•speckx•4d ago•45 comments

Florida's HOAs and condo associations are making the housing crisis worse

https://hoaspy.com/hoa/fl/florida-hoa-housing-crisis.html
146•lovewins•4h ago•240 comments

How the Elizabeth Holmes documentary “You Can See Everything” is deceiving

https://www.readtheprofile.com/p/elizabeth-holmes-documentary-you-can-see-everything
348•MaysonL•19h ago•490 comments

Types of types: Haskell's Kind system

https://thunk.blog/posts/types-of-types-haskell-kind-system/
92•Thom2503•4d ago•72 comments

Parser Combinators

https://t3.at/blog/2026-10-17-parser-combinators/
217•schindlabua•14h ago•77 comments

Show HN: Sphinx – A hook that quizzes you on your AI's code before shipping

https://sphinx-six-theta.vercel.app/
238•critiquebrowser•18h ago•81 comments

Netflix vmaf: Perceptual video quality assessment based on multi-method fusion

https://github.com/Netflix/vmaf
12•tosh•2h ago•5 comments

Show HN: OmniPTY – Opinionated terminal emulator for macOS and Linux

https://github.com/omnipty-terminal/omnipty
6•bobbycoleman-de•1h ago•0 comments

Teal – A statically-typed dialect of Lua

https://teal-language.org/
157•Lyngbakr•2d ago•63 comments

Show HN: Ranet3 – High performance policy routed IPsec mesh SD-WAN

https://ranet3.com/
23•StepBroBD•8h 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.