Use insert and extract functionality for rational/double conversion