Surya Siddhanta
मध्याह्नेन्दुप्रभाकर्णसङ्गुणा यदि सोत्तरा । तदार्कघ्नाक्षजीवायाम् शोध्या योज्या च दक्षिणा॥
Multiply this by the hypothenuse of the moon's mid-dav shadow, and, when it is north, subtract it from the sine of latitude (aksha) multiplied by twelve ; when it is south, add it to the same.
english translation