This is an important floating point math routine, documented in many places. Usage example: - https://www.lemon64.com/forum/viewtopic.php?t=10492