Open any JavaScript console right now and type 0.1 plus 0.2. It will not give you 0.3. It gives you 0.30000000000000004. This is not a bug in JavaScript specifically, almost every programming language does this, because computers store decimal numbers in a way that cannot perfectly represent numbers like 0.1 in binary. Most of the time nobody notices, a pixel is off by a hair, a chart rounds slightly wrong.

In a fintech backend, this exact quirk can quietly cost real money, and the scary part is that it usually works perfectly fine for months before it shows up.

How this actually shows up in a banking backend

Picture a simple fee calculation. A transfer of ten dollars with a small percentage fee attached.

@Injectable()