Created originally on Bitbucket by remarkablerocket
Was already merged in Bitbucket before import, marked as merged by the import user
Note one of the tests added (test_non_numeric_input_types) is almost completely copied from pypy/lib-python/3/test/test_float.py - no idea if this is acceptable but I didn't anywhere I could improve on it.