J (10)
Very, very, very inspired by the answer of @Dennis:
<.@%~^&1.5
And a slightly longer, but with better performance (I suspect):
<.@(-:&.^.)
floor(halve under log)
J (10)
Very, very, very inspired by the answer of @Dennis:
<.@%~^&1.5
And a slightly longer, but with better performance (I suspect):
<.@(-:&.^.)
floor(halve under log)