Actually I don't really understand why don't you simply write to the "E2" cell:
D2-D1 (assuming that your values are in the D column), and then just drag the formula down, until you have values.
(I understand that you'll have more and more values in the D column, but you can add an if condition to check whether that particular D cell is empty or not, and if not then calculate the substraction from the previous row.)
Maybe that's not what you are looking for (then sorry, I misunderstood the question), but anyway I would do it this way.
Hope it helped.
UPDATE:
After understanding the real problem, I would use this function:
=arrayformula(if(isblank(A3:A100),"",filter(A3:A100,A3:A100>-1)-filter(A2:A99,A2:A99>-1)))
Supposing that your data is in the A column (and no value in the A column is smaller than 0!), write this to cell B3, and it will produce the diff-s.
Explanation: Look at the last part of the function - ...filter(A3:A100,A3:A100>-1)-filter(A2:A99,A2:A99>-1) - This is simply two queries which will give back two equal size list. The first one is going from A3-A100, the second one goes from A2-A99. It's essential that the elements in the two lists should be equal. (In this case 98 elements are in both lists). And there is a substraction (-) sign between the two list, so if we put ARRAYFORMULA before these two lists it will do the substraction for every "pair" in the lists. First element of the lists are "A3" and "A2", so A3-A2 will be the value of B3. Second elements of the list are "A4" and "A3", so A4-A3 will go to B4, and so on. So basically we're done:
=arrayformula(filter(A3:A100,A3:A100>-1)-filter(A2:A99,A2:A99>-1))
The main part is done, although an extra IF serves the purpose that if the current A field is blank then we write an empty string (""), otherwise we compute the substraction, mentioned above.
So the full function again:
=arrayformula(if(isblank(A3:A100),"",filter(A3:A100,A3:A100>-1)-filter(A2:A99,A2:A99>-1)))
As I said earlier, this function assumes that there are only non-negative numbers in column A. If that's not the case, simply rewrite the filter condition (-1) to a very small NEGATIVE number. (like "-99999999")
Hope it helps.