This replaces unnecessary double-precision soft-float operations with single-precision floating-point operations, mainly by casting. In a couple places I also replace a function call with a constant.