Wikipedia says they go back to China and India a couple of millennia ago. I doubt it.
I am looking for an example of an algorithm:
1. Compute a number X that can be positive or negative.In doing my income taxes, I cannot find any example of IRS using such an algorithm.
2. Use X to compute something else, without dividing into two cases.
I am guessing such algorithms started to appear around 1800 or so.
For a long time, understanding of negative numbers was delayed by the impossibility of having a negative-number amount of a physical object, for example "minus-three apples", and negative solutions to problems were considered "false".But that is not impossible at all, as having "minus-three apples" means owing 3 apples.
Furthermore, lots of other natural measurements can be negative. I could ask "how far are you east of the landmark?" and get a negative answer. Likewise, feet below sea leval, freezing temperature, or a countdown to an anticipated event. If I ask the cost of something, and it turns out to be a benefit, then it has negative cost.
Newtonian Physics was invented around 1680. Today, textbooks explain it with force diagrams, where force vectors are added. These seems to require negative numbers, as forces can cancel out. It also seems to require vectors, but vectors were not invented until about 200 years later. It is hard to imagine that Newton did not understand negative numbers, but maybe not, if he did not understand vectors either.