From what I understand, the script is doing a interval match on dates, but these dates might have looked like this
FromDate, ToDate
01/01/2018 02/01/2018
02/01/2018 03/01/2018
03/01/2018 04/01/2018
As you might see 02/01/2018 is found in both Row1 and Row2... in order to solve this problem, the script is subtracting a very very small number from 02/01/2018 in the first row.
Pow() is just a power function. So, 2 raise to the power of -37 is what we are subtracting from ToDate to make it slighly less than 02/01/2018... may be like 01/31/2018 23:59:59 and some micro seconds....