Fix use of double math functions for float arguments.