Temperature = TempRead + ( TempRead - TempPrev )
it is a crude form of forward error estimation. What it does is to say that the same "error", as defined by TempRead - TempPrev, will persist for the next read, which is generally true and helpful for slow-moving measurements, like temperature.
However, in cases of very high gain (very frequent temperature readings), this approach will yield unstable readings - it is essentially the D in a pid controller.
A different from of it would go like this:
Temperature = TempRead + (( TempRead - TempPrev ) - (TempPrev - TempPrev2)); where TempPrev2 is the temperature two readings ago.