Surya Siddhanta
तात्कालिकौ पुनः कार्यौ विक्षेपौ च तयोस् ततः। दिक्तुल्ये त्व् अन्तरम् भेदे योगः शिष्टम् ग्रहान्तरम्॥
Calculate again the longitudes of the two planets for the determined time, and from these their latitudes : when the latter are of the same direction, take -their difference; otherwise, their sum : the result is the interval of the planets.
english translation
tAtkAlikau punaH kAryau vikSepau ca tayos tataH। diktulye tv antaram bhede yogaH ziSTam grahAntaram॥
hk transliteration by Sanscript