1. A method for detecting a seizure in an implantable or wearable medical device (IMD), the method comprising: executing an algorithm having a plurality of ratio determinations of foreground seizure energies divided by background seizure energies, in which the algorithm uses a ratio estimation in place of fixed point division to determine a majority of the ratios, wherein the ratio estimation includes estimating a Numerator (N) divided by a Denominator (D), the estimating including obtaining a result as a function of 2 raised to the power of the difference between the most significant set bit position (MSSB) of the D and the MSSB of the N; and generating an indication of a detected seizure at least in part as a function of the ratio determinations with the self-powered IMD or the self-powered wearable medical device.