A hardware-oriented algorithm for floating-point function generation