Generalize double

So... probably not going to get merged anytime soon, but we should start the process.