The book provides an algorithm. I didn’t bother writing the details.
tags : floating point, handbookfp