L

Learn AI

Track progress · learn offline

Open

Lesson 6 of 9

Letting it run code and count

7 min read

The same AI that writes a flawless essay will cheerfully tell you 9.11 is bigger than 9.9. How can something so capable be so bad at a sum a child can do?

It's guessing the answer, not calculating it

Here's the surprise: by default, the AI doesn't calculate at all. It predicts its answer the same way it predicts words — a quick, intuitive next-guess. For "9.11 or 9.9?", the ".11 looks longer than .9" pattern is strong, so it blurts the wrong one before any real working. Force it to slow down and lay the steps out, though — line the numbers up, compare digit by digit — and it gets there. Reasoning takes room to happen, and a blurted one-shot answer gives it none.

By default the AI guesses an answer in one shot, which fails on exact maths. Made to work step by step — spreading the problem across more words — it has room to actually reason its way to the right result.

Or just let it use a calculator

There's an even more reliable fix, and it's the same trick from the last lesson: a tool. When precision really matters, a good assistant doesn't do the sum in its head at all — it writes a tiny bit of code, actually runs it, and reads back the exact result. The computer does what computers are good at; the AI does the talking. For anything that must be exact — totals, dates, converting units, sorting a list — the surest path is to have it run the numbers, not recall them.

For exact answers, the AI can write and run real code, then report the precise result. Guessing is fine for prose; when the number has to be right, let it use the calculator.

Under the hood, if you're curious: this is why the same model can feel genius and clueless minute to minute — it's brilliant at language patterns and shaky at exact calculation. Knowing which mode a task needs is half the skill.

The gist

You ask an AI to add up a long column of expenses and it fires back a total instantly. Smart move?

Continue in the app

Take the whole Working with AI course — tracked

Get your personalized path, progress and streaks in the app — this lesson and every next one, in order.