Three ways of doubling, inspired by Will it optimize?

Opera 10.6.3 failed to run the tests.