Heck even Safari on my phone autofilled “8” when typing this comment.
Sure enough: System Settings -> Keyboard -> (under the "text input" area) Edit... (button next to your primary keyboard language) -> toggle "Show Inline Predictive Text"
If you want to easily switch between having it and not, I bet you can set a second keyboard with the same language but a different setting there and use the quick keyboard switcher widget/shortcuts (I did not try this, though). Or there's probably a way to shortcut it with AppleScript or some other automation thingy with ten minutes of effort (mostly googling).
[EDIT] A quirk: I do have to hit "done" on the window before it seems to apply the change, toggling doesn't do it until I hit "done" (I just tried again to double-check and noticed this)
[EDIT 2] Nb I don't not-believe you, we could be on different OS versions (I'm on 15.1) or something else could be causing the difference.
Currently it's not autocompleting some simple algebra. But if I enter more "complex" equations ("3 / 4 =", "3 * 5 - 2 - 1 =", "tan(pi) =", etc.) then it autocompletes those. I can't figure out why it's inconsistent. And I've definitely checked and confirmed "Show inline predictive text" is disabled and I've rebooted to try and give everything a fresh start.
One thing I've noticed is that if I enter the same equation multiple times it might stop suggesting for that specific equation, so I suggest trying multiple different equations.
I've felt for some time they're overdue for an "almost nothing but bug fixes and performance improvements" major release like we got a couple times in the 20-teens :-/
I also tried their “handwriting improvement” feature that claims to clean up lines a bit while still looking like your own writing. All it did was turn legible writing into total gibberish.
For fielded input matching known patterns, recognition can also be constrained by pattern matching and general validation rules (e.g., VINs are 17 characters long, cannot contain the letters I, O, or Q, and, given prior information in other fields, can be further constrained by manufacturer code, model year, and by requiring a correct check digit).
(I get that not everybody bothers doing vaguely complex mental arithmetic, but dividing by two? Come on!)