Improved compatibility with BigFloat and other arbitrary numeric types