Surya Siddhanta
चलकर्णहृतम् भुक्तौ कर्णे त्रिज्याधिके धनम् । ऋणम् ऊने +अधिके प्रोज्झ्य शेषम् वक्रगतिर् भवेत् ॥
Divide the product by the (said) 2nd hypothenuse, add the quotient (to the manda-sphuṭa motion of the planet) when the 2nd hypothenuse is greater than the radius;[1] but when it is less than the radius subtract the quotient (from the manda-sphuṭa motion, the result will be the true motion of the planet). (But in the latter case), if the quotient be greater (than the manda-sphuṭa motion,) subtract (the manda-sphuṭa motion from the quotient); the remainder will be the retrograde motion of the planet.
english translation
calakarNahRtam bhuktau karNe trijyAdhike dhanam । RNam Une +adhike projjhya zeSam vakragatir bhavet ॥
hk transliteration by Sanscript