Methods and devices for performing division approximation in implantable
and wearable self-powered medical devices. The present invention provides
rapid methods for performing an approximation of division on fixed point
numbers, where the methods are easily implemented in small, low power
consumption devices as may be found in implantable medical devices. One
example of use is in rapidly determining the approximate ratio between
foreground and background activity in seizure detection algorithms. Some
methods approximate the ratio of Numerator (N) to Denominator (D) by
raising 2 to the power of the difference in the number of zeros to the
left of the Most Significant Set Bit (MSSB) of D vs. N. Some methods may
also pad bits to the right of the approximate ratio MSSB using bits from
the right of the N MSSB, and/or pre-process the smaller of D or N by
rounding the value upward. Methods may be implemented in firmware and/or
in discrete logic.