Returns 2 raised to power n
< ? php function power2 ( $ n ) { if ( $ n == 0 ) return 1 ; if ( $ n == 1 ) return 2 ; return power2 ( $ n / 2 ) * power2 ( $ n / 2 ) ; } function multiply ( $ x , $ n ) { return $ x * power2 ( $ n ) ; }